Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
I have multiple templates on one document type. I'm trying to show / hide a section of HTML in the template based on a page field value.
I realise the beliow wont work but it's something like that I'm trying to achieve.
<%if(<umbraco:Item field="showLandingHeader" runat="server"></umbraco:Item> == '1') {%> <div id="productLandingTop"> <umbraco:Macro ID="Macro4" Alias="ProductHeaderImage" runat="server"></umbraco:Macro> </div> <%} %>
Any ideas?
Thanks,Chris
Hi Chris, maybe try...
umbraco.library.GetItem('showLandingHeader') == '1'
... to get the item's value?
(I haven't tested this though.)
Cheers, Lee.
Of course....
I'd forgotten the fab API existed :-)
Thanks Lee
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Parsing Umbraco page fields within inline .NET in template
Hi all,
I have multiple templates on one document type. I'm trying to show / hide a section of HTML in the template based on a page field value.
I realise the beliow wont work but it's something like that I'm trying to achieve.
Any ideas?
Thanks,
Chris
Hi Chris, maybe try...
... to get the item's value?
(I haven't tested this though.)
Cheers, Lee.
Of course....
I'd forgotten the fab API existed :-)
Thanks Lee
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.