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
Hi,
I was wondering if there is a way to use the "name" attribute from an image as the caption with the MTT gallery package.
In the XSLT file I can see where this would go, but I'm unsure of the XSLT needed to insert here as the "name" attribute is from the image itself.
Does anyone know?
Cheers, Garry.
Hi everyone,
I solved this myself so if anyone is interested - I simple put the following XSLT into the mtt_showpics file:
<xsl:value-of select="current()/@nodeName"/>
The "nodeName" was simply in the properties section of each image - and this now displays as a caption below the image. The code is:
<div class="imgWrapper" style="width:{$thumbW}px; height:{$wrapperH}px; overflow:hidden;"><img><xsl:attribute name="src">/umbraco/imageGen.aspx?image=<xsl:value-of select="$picFile"/>&width=<xsl:value-of select="$thumbW"/>&constrain=true</xsl:attribute> </img></div></a><xsl:value-of select="current()/@nodeName"/></div>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
MTT Gallery captions
Hi,
I was wondering if there is a way to use the "name" attribute from an image as the caption with the MTT gallery package.
In the XSLT file I can see where this would go, but I'm unsure of the XSLT needed to insert here as the "name" attribute is from the image itself.
Does anyone know?
Cheers, Garry.
Hi everyone,
I solved this myself so if anyone is interested - I simple put the following XSLT into the mtt_showpics file:
<xsl:value-of select="current()/@nodeName"/>
The "nodeName" was simply in the properties section of each image - and this now displays as a caption below the image. The code is:
<div class="imgWrapper" style="width:{$thumbW}px; height:{$wrapperH}px; overflow:hidden;">
<img>
<xsl:attribute name="src">/umbraco/imageGen.aspx?image=<xsl:value-of select="$picFile"/>&width=<xsl:value-of select="$thumbW"/>&constrain=true</xsl:attribute>
</img>
</div>
</a>
<xsl:value-of select="current()/@nodeName"/>
</div>
is working on a reply...