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
I cannot get GetMedia working in an XSLT macro when using the 4.5 release with the legacy schema.
Here's my code:
<xsl:value-of select="umbraco.library:GetMedia(1070, 0)/data [@alias='umbracoFile']" />
Where 1070 is a Media item of type Image. The code returns nothing.
Any ideas???
Hi Matthew,
Try adding the node name to the XPath...
<xsl:value-of select="umbraco.library:GetMedia(1070, 0)/node/data[@alias='umbracoFile']" />
or failing that, try using the nodeTypeAlias (from the new schema - this is guesswork).
<xsl:value-of select="umbraco.library:GetMedia(1070, 0)/Image/data[@alias='umbracoFile']" />
Good luck!
Cheers, Lee.
Lee,
You nailed it! Thanks so much.
Matt
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetMedia problems with legacy schema in Umbraco 4.5
I cannot get GetMedia working in an XSLT macro when using the 4.5 release with the legacy schema.
Here's my code:
<xsl:value-of select="umbraco.library:GetMedia(1070, 0)/data [@alias='umbracoFile']" />
Where 1070 is a Media item of type Image. The code returns nothing.
Any ideas???
Hi Matthew,
Try adding the node name to the XPath...
or failing that, try using the nodeTypeAlias (from the new schema - this is guesswork).
Good luck!
Cheers, Lee.
Lee,
You nailed it! Thanks so much.
Matt
is working on a reply...