Hi folks,
I want a Navigation-Box surrounded by div-tags to disappear when theres no content in it.
It works for me with the GetItem-field property for the content with "insertTextbefore" and "insertTextafter", like this:
Code:
<?UMBRACO_GETITEM field="sidebarcontent" insertTextBefore="<div class="SidebarContent">" insertTextAfter="</div>" recursive="true"/>
The insertTextBefore is : <div class="SidebarContent">
The insertTextAfter is just: </div>
I don't know why umbraco makes such a mess of my markup when entered in this field, but it works fine this way!
Now it gets a little more complicated, as i have another SidebarContent-div, but this time with the GETITEM-field AND a Macro in it (for Navigation-Links), like this:
Code:
<div class="SidebarContent">
<?UMBRACO_GETITEM field="sidebarcontent" recursive="true"/>
<?UMBRACO_MACRO macroAlias="SidebarNavigation"></?UMBRACO_MACRO>
</div>
When i just insert the Macro in the "inserttextAfter"-field of the GETITEM, it doesn't works out/fails to display, so i guess one cannot insert a macro in one of this fields.
However, the Macro itselfs doesn't seem to have "insertTextBefore"/"insertTextAfter"-properties, so i can't put the divs in it either.
The result is that when theres no content in the GETITEM and the Macro, there are visible borders of the div on the frontend, what i don't want. I wan't the box to completly disapear.
I also wonder what could be written between the Macro tags and if it could help me out?
Code:
<?UMBRACO_MACRO macroAlias="blabla"> What could i write in here? </?UMBRACO_MACRO>
Anyone an idea how to solve this problem?
Greetings,
Electric-Ric