I'm using a simple image gallery macro using Imagegen (thanks Doug :)), and it works really well.
The image thumbs are pulled into a <ul> - <li> and I would like to add a dynamic title beneath each, i'm assuming @nodeName is used to this effect. Could someone suggest the correct xslt syntax to achieve this? My umbraco skills are limited so any help would be appreciated.
I am implementing a gallery the same way brian is doing. The only difference that I want a custom property of media to be part of the title of the <a> tag.
I am not able to get the exact syntax for that. Can anyone help?
@nodeName image title in XSLT file?
I'm using a simple image gallery macro using Imagegen (thanks Doug :)), and it works really well.
The image thumbs are pulled into a <ul> - <li> and I would like to add a dynamic title beneath each, i'm assuming @nodeName is used to this effect. Could someone suggest the correct xslt syntax to achieve this? My umbraco skills are limited so any help would be appreciated.
Many thanks
Brian - (snippet below).
<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="{@nodeName}" 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>
<p> IMAGE TITLE HERE</p>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:if>
Hi Brian,
You use the value-of instruction to do that, like this:
/Chriztian
Awesome, thanks Chriztian.
Hi ,
I am implementing a gallery the same way brian is doing. The only difference that I want a custom property of media to be part of the title of the <a> tag.
I am not able to get the exact syntax for that. Can anyone help?
my XSLT looks like
<a href="{umbracoFile}" title="ValueOfCustomProperty" 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" />
Hi Aditya,
I have posted an answer in this post to you.
http://our.umbraco.org/forum/developers/xslt/40727-Syntax-for-getting-custom-property-of-media-image?p=0#comment149013
/Dennis
is working on a reply...