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 can someone help me solve this out
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:sort select="@createDate" order="descending" /> <xsl:if test="position () <= $maxEvenements"> <div class="newsDes"> <img src="{posterEvenements}" alt="{@nodeName}"/> <div class="txtDate"><xsl:value-of select="umbraco.library:LongDate(@createDate)"/></div> <div class="txtTit"><h1><a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/></a></h1></div> <div class="txtSum"><a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="summaryEvenments"/></a></div> <div class="txtMore"><a href="{umbraco.library:NiceUrl(@id)}" id="lire">Lire la suite</a></div></div> </xsl:if>
Here is my news List and i want to make an if statement so that image shows up only when uploaded.
Just put the xsl:if around the img-tag:
<xsl:if test="posterEvenements !=''"><img src="{posterEvenements}" alt="{@nodeName}"/></xsl:if>
Is that what you want?
thanks Berntsen
It works
Great... Remember to mark my post as the answer to your question, that way other users can see that your question has been answered. :)
Hehe, Fuji. Normally you would mark the post which answered your question, as the solution.... :-)
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
How to get an if statement to work in XSLT for images
Hi can someone help me solve this out
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
<xsl:sort select="@createDate" order="descending" />
<xsl:if test="position () <= $maxEvenements">
<div class="newsDes">
<img src="{posterEvenements}" alt="{@nodeName}"/>
<div class="txtDate"><xsl:value-of select="umbraco.library:LongDate(@createDate)"/></div>
<div class="txtTit"><h1><a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/></a></h1></div>
<div class="txtSum"><a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="summaryEvenments"/></a></div>
<div class="txtMore"><a href="{umbraco.library:NiceUrl(@id)}" id="lire">Lire la suite</a></div>
</div>
</xsl:if>
Here is my news List and i want to make an if statement so that image shows up only when uploaded.
Just put the xsl:if around the img-tag:
Is that what you want?
thanks Berntsen
It works
Great... Remember to mark my post as the answer to your question, that way other users can see that your question has been answered. :)
Hehe, Fuji. Normally you would mark the post which answered your question, as the solution.... :-)
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.