Hi ,I am trying to implement an image gallery with Image Gen and i am having trouble getting a custom prperty 'imageDescription' in the title of the <a> tag. Does any one know how to do this?my current XSLT look like this.<xsl:if test="number($mediaFolderId)"> <ul id="gallery"> <xsl:for-each select="umbraco.library:GetMedia($mediaFolderId, true())/Image"> <xsl:if test="umbracoFile !=''"> <li> <a href="{umbracoFile}" title="imageDescription" rel="gallery"> <img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&width={$thumbWidth}&height={$thumbHeight}" width="{$thumbWidth}" height="{$thumbHeight}" alt="{@nodeName}" title="{@nodeName}" class="thumbnail" /> </a> </li> </xsl:if> </xsl:for-each> </ul> </xsl:if>
Syntax for getting custom property of media image
Hi ,I am trying to implement an image gallery with Image Gen and i am having trouble getting a custom prperty 'imageDescription' in the title of the <a> tag. Does any one know how to do this?my current XSLT look like this.<xsl:if test="number($mediaFolderId)"> <ul id="gallery"> <xsl:for-each select="umbraco.library:GetMedia($mediaFolderId, true())/Image"> <xsl:if test="umbracoFile !=''"> <li> <a href="{umbracoFile}" title="imageDescription" rel="gallery"> <img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&width={$thumbWidth}&height={$thumbHeight}" width="{$thumbWidth}" height="{$thumbHeight}" alt="{@nodeName}" title="{@nodeName}" class="thumbnail" /> </a> </li> </xsl:if> </xsl:for-each> </ul> </xsl:if>
Sorry for bad formatting. hope this one works
<xsl:if test="number($mediaFolderId)">
<ul id="gallery">
<xsl:for-each select="umbraco.library:GetMedia($mediaFolderId, true())/Image">
<xsl:if test="umbracoFile !=''">
<li>
<a href="{umbracoFile}" title="imageDescription" rel="gallery">
<img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&width={$thumbWidth}&height= {$thumbHeight}" width="{$thumbWidth}" height="{$thumbHeight}" alt="{@nodeName}" title="{@nodeName}" class="thumbnail" /> </a>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:if>
Hi Aditya,
I think this will work for you.
/Dennis
Thanks alot. It works!!!
Hi Aditya,
Great to hear that.
/Dennis
is working on a reply...