Umbraco XSLT issue
- by Brad
I'm trying to use the Umbraco GetMedia function to write an image URL to the screen, I receive an error parsing the XSLT file.
<xsl:for-each select="$currentPage/descendant::node [string(data [@alias='tickerItemActive']) = '1']">
<xsl:value-of select="data [@alias='tickerText']"/><br />
<xsl:value-of select="umbraco.library:GetMedia(data [@alias='tickerImage'], 0)/data [@alias = 'umbracoFile']"/>
</xsl:for-each>
The tickerImage field contains the MediaID for which I'd like to display the URL. I can return the field outside the GetMedia function and it works fine. I can also replace the data [@alias='tickerImage] with '1117' (or any valid media ID) the XSLT passes verification and the script runs.
THIS WORKS:
<xsl:value-of select="umbraco.library:GetMedia('1117', 0)/data [@alias = 'umbracoFile']"/>
THIS DOES NOT:
<xsl:value-of select="umbraco.library:GetMedia(data [@alias='tickerImage'], 0)/data [@alias = 'umbracoFile']"/>
Any help that can be offered would is appreciated.
Thanks!