Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Garry Bain 149 posts 124 karma points
    Aug 06, 2009 @ 15:03
    Garry Bain
    0

    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.

  • Garry Bain 149 posts 124 karma points
    Aug 06, 2009 @ 15:23
    Garry Bain
    1

    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"/>&amp;width=<xsl:value-of select="$thumbW"/>&amp;constrain=true</xsl:attribute>
    </img>
    </div>
    </a>
    <xsl:value-of select="current()/@nodeName"/>
    </div>

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies