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 have a XSLT script that does a for each on the sub pages of my products.
I can show links and bodytext information no problem but I want to display a logo associated with a product but if i wrap say
<xsl:value-of select="data [@alias = 'productLogo']"/>
in a <img src' ' /> I get a compile error. if I use " I get a complile error too.
If I just output the value I get the path to the file as expected. What am I doing wrong?
Thanks
Hi Streety,
Do you know what type of data-type the "productLogo" property is using? A media picker or upload field?
If it's a Media Picker, then take a look at a blog post that I wrote a while back about GetMedia: http://blog.leekelleher.com/2009/11/30/how-to-use-umbraco-library-getmedia-in-xslt/
If it's an Upload field, then its probably a syntax error in the XSLT. You could use something like this?
<img src="{data[@alias='productLogo']}" />
Cheers, Lee.
Thank you.
That sorted it.
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
Displaying Images in XSLT
Hello,
I have a XSLT script that does a for each on the sub pages of my products.
I can show links and bodytext information no problem but I want to display a logo associated with a product but if i wrap say
in a <img src' ' /> I get a compile error. if I use " I get a complile error too.
If I just output the value I get the path to the file as expected. What am I doing wrong?
Thanks
Hi Streety,
Do you know what type of data-type the "productLogo" property is using? A media picker or upload field?
If it's a Media Picker, then take a look at a blog post that I wrote a while back about GetMedia: http://blog.leekelleher.com/2009/11/30/how-to-use-umbraco-library-getmedia-in-xslt/
If it's an Upload field, then its probably a syntax error in the XSLT. You could use something like this?
Cheers, Lee.
Thank you.
That sorted it.
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.