Copied to clipboard

Flag this post as spam?

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


  • Paul Sørensen 304 posts 650 karma points
    Dec 12, 2009 @ 16:57
    Paul Sørensen
    0

    Click to see larger image

    Hi

    I have a list of images (holeSmallImage) where the user can see a larger version (holeLargeImage) of the image by cliking on it.

    The problem is that when I click on the image I get sent back to the same page - ie. the URL I'm creating in bold is wrong.
    What am I doing wrong ?

    Thanks

    Paul S

          <xsl:variable name="mediaId" select="number(./data[@alias='holeSmallImage'])" />
          <xsl:variable name="mediaLargeId" select="number(./data[@alias='holeLargeImage'])" />
          <xsl:value-of select="umbraco.library:NiceUrl($mediaLargeId)" />
          <xsl:if test="$mediaId &gt; 0">
                <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
                <xsl:if test="count($mediaNode/data) &gt; 0">
                  <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
                    <a href="{umbraco.library:NiceUrl($mediaLargeId)}">
                    <img src="{$mediaNode/data[@alias='umbracoFile']}" alt="[image]">
                      <xsl:if test="string($mediaNode/data[@alias='umbracoHeight']) != ''">
                        <xsl:attribute name="height">
                          <xsl:value-of select="$mediaNode/data[@alias='umbracoHeight']" />
                        </xsl:attribute>
                      </xsl:if>
                      <xsl:if test="string($mediaNode/data[@alias='umbracoWidth']) != ''">
                        <xsl:attribute name="width">
                          <xsl:value-of select="$mediaNode/data[@alias='umbracoWidth']" />
                        </xsl:attribute>
                      </xsl:if>
                    </img>
                    </a>
                  </xsl:if>
                </xsl:if>
              </xsl:if>

  • Paul Sørensen 304 posts 650 karma points
    Dec 13, 2009 @ 12:17
    Paul Sørensen
    0

     

    Problem solved - just added the underlined line and changed the bolded line.

                <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
                <xsl:variable name="mediaLargeNode" select="umbraco.library:GetMedia($mediaLargeId, 0)" />
               
    <xsl:if test="count($mediaNode/data) &gt; 0">
                  <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
                    <a href="{$mediaLargeNode/data[@alias='umbracoFile']}">

    /Paul S

Please Sign in or register to post replies

Write your reply to:

Draft