If I understand your question correctly, then you are trying to print out an image from a media picker data type with an alias of logoFile. If so, this XSLT should print out the image.
Yes, for the most part that would work but I see now I forgot to add one important item, the image is not always necessarily present. So for pages that have a logoFile it will display the nodes, but it will return a parse error if there isn't any.
This is an item that may or may not be present, and may be in one or many places depending on the determination of the content editor
XSLT variables and umbraco.library
Hi All,
I hope this is a really simple one, but I'm very new to XSLT and for me unexpected syntax is what actually works when doing xslt work.
I want to assign a variable, and depending on conditions assign a value from umbraco.library. If it were anything else, I would write it as such:
Unfortunately I can't seem to get this when I want to call from something in umbraco library. E.G. this does not work:
But what I can get to work (and what doesn't work for the structure of the display) is:
If I could get the second option to work some how, a lot of dynamic content building would go smoothly.
Thank you for your time reading my inquiry.
Hi Nathan,
If I understand your question correctly, then you are trying to print out an image from a media picker data type with an alias of logoFile. If so, this XSLT should print out the image.
<xsl:variable name="alt" select="umbraco.library:GetMedia($currentPage/logoFile, 0)/@nodeName" />
I hope this can help you in some way.
/Dennis
Hi Dennis,
Yes, for the most part that would work but I see now I forgot to add one important item, the image is not always necessarily present. So for pages that have a logoFile it will display the nodes, but it will return a parse error if there isn't any.
This is an item that may or may not be present, and may be in one or many places depending on the determination of the content editor
is working on a reply...