I have a problem with a link to an image creating a link to the H5 also, in
my code. I have tried closing the href before the H5, but it's still
turning the H5 into a link. I want the image to be linked, but not the H5.
(The left part is the image,
created by a crop which links to a page). The H5 is the text on the
right (that I don't want linking) and the arrow is the slidearrowLink).
<h5><xsl:value-ofselect="@nodeName"/></h5>
The above is the H5 section that's being converted into a link and below is the entire code. Thanks!
I have just looked into your coode. I only reason why your H5 turns into a link, is because the hole part is wrapped in a link as I see it.Correct meif I'm wrong.
Thanks for taking a look. Strange because in my live example it's not wrapping the entire block of code!
Even when closing the href earlier, the H5 text is still linking to the image. I think it's getting the link from the href attribute, because when I remove that the link disappears?
Link affects H5 and image
Hi guys,
I have a problem with a link to an image creating a link to the H5 also, in my code. I have tried closing the href before the H5, but it's still turning the H5 into a link. I want the image to be linked, but not the H5.
Here's a pic of how it works:
http://oi41.tinypic.com/2h3ac1c.jpg
(The left part is the image, created by a crop which links to a page). The H5 is the text on the right (that I don't want linking) and the arrow is the slidearrowLink).
The above is the H5 section that's being converted into a link and below is the entire code. Thanks!
Hi Devin,
I have just looked into your coode. I only reason why your H5 turns into a link, is because the hole part is wrapped in a link as I see it.Correct me if I'm wrong.
<a class="rsImg" src="/imagegen.ashx?image={$photo}&width=760&Compression=70&Allow" width="100%">
<xsl:if test="normalize-space($articleImage)">
<!-- Grab the media node -->
<xsl:variable name="mediaNode" s elect="umbraco.library:GetMedia($articleImage, 0)" />
<!-- Select the banner crop (if present) -->
<xsl:variable name="bannerCrop" select="$mediaNode//crop[@name = 'banner']" />
<xsl:if test="$bannerCrop">
<!-- Override the img tag src attribute -->
<xsl:attribute name="href"><xsl:value-of select="$bannerCrop/@url" /></xsl:attribute>
</xsl:if>
</xsl:if>
<div class="rsTmb">
<h5><xsl:value-of select="@nodeName"/></h5>
<div class="slideArrowLink">
<a style="color: #fff;" href="{umbraco.library:NiceUrl(@id)}"><img src="/images/slidearrow.jpg" /></a>
</div>
</div>
</a>
I hope that I have spotted why your H5 turns into a link. I have highlighted the code I think why your H5 turns into a link
Hope this helps you.
/Dennis
Hi Dennis,
Thanks for taking a look. Strange because in my live example it's not wrapping the entire block of code!
Even when closing the href earlier, the H5 text is still linking to the image. I think it's getting the link from the href attribute, because when I remove that the link disappears?
Thanks
is working on a reply...