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 am having trouble outputting an image from the following xslt in version 4.6:
<ul id="index"><xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <img src="{umbraco.library:GetMedia(indexImage, false())}" width="173" height="98" alt="{@nodeName}" /> <div> <h3><xsl:value-of select='@nodeName'/> <xsl:value-of select='indexImage'/></h3> <p><xsl:value-of select="bodyText"/></p> </div> </a> </li> </xsl:for-each></ul>
The correct image filename is returned but it has additional trailing characters? The image is called logo_msnet.jpg but I am getting logo_msnet.jpg173983741jpg
Any help would be greatly appreciated.
Thanks,
Ed
Sorry about the post title I've tried to change it but I am getting errors! Not having a good day.
Hi Edward,
You just need to get the umbracoFile property from that:
<img src="{umbraco.library:GetMedia(indexImage, false())/umbracoFile}" width="173" height="98" alt="{@nodeName}" />
/Chriztian
Thanks Chriztian, I thought I had tried that! It's obviously getting to late.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
http://www.entropyit.pipeten.co.uk/media/209/logo_msnet.jpg173983741jpg
Hi,
I am having trouble outputting an image from the following xslt in version 4.6:
<ul id="index">
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<img src="{umbraco.library:GetMedia(indexImage, false())}" width="173" height="98" alt="{@nodeName}" />
<div>
<h3><xsl:value-of select='@nodeName'/> <xsl:value-of select='indexImage'/></h3>
<p><xsl:value-of select="bodyText"/></p>
</div>
</a>
</li>
</xsl:for-each>
</ul>
The correct image filename is returned but it has additional trailing characters? The image is called logo_msnet.jpg but I am getting logo_msnet.jpg173983741jpg
Any help would be greatly appreciated.
Thanks,
Ed
Sorry about the post title I've tried to change it but I am getting errors! Not having a good day.
Hi Edward,
You just need to get the umbracoFile property from that:
/Chriztian
Thanks Chriztian, I thought I had tried that! It's obviously getting to late.
is working on a reply...