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 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 > 0"> <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" /> <xsl:if test="count($mediaNode/data) > 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>
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) > 0"> <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''"> <a href="{$mediaLargeNode/data[@alias='umbracoFile']}">
/Paul S
is working on a reply...
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.
Continue discussion
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 > 0">
<xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
<xsl:if test="count($mediaNode/data) > 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>
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) > 0">
<xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
<a href="{$mediaLargeNode/data[@alias='umbracoFile']}">
/Paul S
is working on a reply...
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.