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
Hello,
I need to list sub items of current page with images near them. I have the following xslt, but it doesn't show the image named as introducerImage.
<xsl:variable name="level" select="3"/>
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <xsl:variable name="media" select="umbraco.library:GetMedia(current()/introducerPicture, 0)" /> <xsl:if test="$media"> <img src="{$media/umbracoFile}" alt="{$media/altText}" /> </xsl:if> <a href="{umbraco.library:NiceUrl(current()/@id)}"><xsl:value-of select="current()/@nodeName" /></a> </li> </xsl:for-each></ul>
Thanks.
seems correct, assuming your pic is taken from the media section? Also worth trying to replace the 0 value with false(). If your pic is an upload field on the doc, you'd need to reference it using
<xsl:variable name="media" select="current()/introducerPicture" />
Cheers,
/Dirk
Thanks for comment.
Yes, I realized that it is true.
I deleted this topic, I think deleting topic doesn't work.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
List sub nodes with image
Hello,
I need to list sub items of current page with images near them. I have the following xslt, but it doesn't show the image named as introducerImage.
<xsl:variable name="level" select="3"/>
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<xsl:variable name="media" select="umbraco.library:GetMedia(current()/introducerPicture, 0)" />
<xsl:if test="$media">
<img src="{$media/umbracoFile}" alt="{$media/altText}" />
</xsl:if>
<a href="{umbraco.library:NiceUrl(current()/@id)}"><xsl:value-of select="current()/@nodeName" /></a>
</li>
</xsl:for-each>
</ul>
Thanks.
seems correct, assuming your pic is taken from the media section? Also worth trying to replace the 0 value with false(). If your pic is an upload field on the doc, you'd need to reference it using
<xsl:variable name="media" select="current()/introducerPicture" />
Cheers,
/Dirk
Thanks for comment.
Yes, I realized that it is true.
I deleted this topic, I think deleting topic doesn't work.
is working on a reply...