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, I have searched these forums but can't find what I am looking for.
Using umbraco v 4.5.2 (Assembly version: 1.0.3891.20719):
I am trying to test for an image field being empty.
<%if(umbraco.library.GetItem("bannerImage") != "") {%> <div class="banner"> <umbraco:Item runat="server" field="bannerImage" xslt="concat('<img src="',umbraco.library:GetMedia({0}, true())/umbracoFile, '" />')" xsltDisableEscaping="true"/> </div> <%}%>
This is from a user control.
How do I achieve what I am trying, I have looked at GetMedia but this returns an xml node iterator
Can someone help?
I ended up going round in circles until I found a snippet pointing at the extensions available in umbraco:
<%if (umbraco.presentation.nodeFactory.Node.GetCurrent().GetProperty("bannerImage").Value != "") {%> <div class="banner"> <umbraco:Item runat="server" field="bannerImage" xslt="concat('<img src="',umbraco.library:GetMedia({0}, true())/umbracoFile, '" />')" xsltDisableEscaping="true"/> </div> <%}%>
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
Media Items Test For No Image
Hi, I have searched these forums but can't find what I am looking for.
Using umbraco v 4.5.2 (Assembly version: 1.0.3891.20719):
I am trying to test for an image field being empty.
<%if(umbraco.library.GetItem("bannerImage") != "") {%>
<div class="banner">
<umbraco:Item runat="server" field="bannerImage" xslt="concat('<img src="',umbraco.library:GetMedia({0}, true())/umbracoFile, '" />')" xsltDisableEscaping="true"/>
</div>
<%}%>
This is from a user control.
How do I achieve what I am trying, I have looked at GetMedia but this returns an xml node iterator
Can someone help?
I ended up going round in circles until I found a snippet pointing at the extensions available in umbraco:
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.