Custom media type with custom property not working in xslt
I have a custom media type which provides the same properties as an image but also includes an additional field called Caption (alias: imageCaption) when I try accessing this in my macro it's returning an empty string, any ideas?
First of all why do you need the variable "theNode" since it is the current node. When selecting, it takes the content of the node, not the node itself.
Custom media type with custom property not working in xslt
I have a custom media type which provides the same properties as an image but also includes an additional field called Caption (alias: imageCaption) when I try accessing this in my macro it's returning an empty string, any ideas?
<xsl:variable name="images" select="number($currentPage/data [@alias = 'galImages'])"/>
<xsl:for-each select="umbraco.library:GetMedia($images, 'true')/node">
<xsl:variable name="theNode" select="."/>
<xsl:variable name="theTitle" select="./data [@alias = 'imageCaption']"/>
<div class="imageCaption">
<p><xsl:value-of select="$theTitle"/></p>
</div>
...
This is an extension of mtt_gallery, I assume I am missing something very simple and your help would be appreciated.
Just some further information if I output the variable theNode it contains the value of the imageCaption property
First of all why do you need the variable "theNode" since it is the current node. When selecting, it takes the content of the node, not the node itself.
This is a sample of working xslt:
If that does not help. Try using:
Then you can see the xml you are working with. then you can look for typo problems.
Ron
is working on a reply...