conditional statement in template using recursive document property
I am trying to test a checkbox document property in my template, and want to do so recursively. The only way I know to allow a document property to be recursive in the template is to use <umbraco:Item> tags and set recursive="true". But, because the conditional statement is in c sharp, how do I set this up to be recursive?
Here is what I tried that obviously doesn't work:
<% if ((String.IsNullOrEmpty(<umbraco:Item field="footerTopShow" recursive="true" runat="server" />))) { %>
conditional statement in template using recursive document property
I am trying to test a checkbox document property in my template, and want to do so recursively. The only way I know to allow a document property to be recursive in the template is to use <umbraco:Item> tags and set recursive="true". But, because the conditional statement is in c sharp, how do I set this up to be recursive?
Here is what I tried that obviously doesn't work:
What version of Umbraco are you using?
Rich
4.7
Hi Neil,
Here is how you could call your recursive value
Hope this helps
I'm not sure how this would work. Where does this code go and what libraries are being used?
Hi Neil,
You can simply add this razor code to your template itself.
is working on a reply...