I know it's a simple question but I'm really struggling to work out how to generate the title attributes test as it contains html tags. The text parts are sliderTitle and bodyText. So far I have:
You can not have real HTML in an attribute, but you can escape the tag-delimiters and have the receiving end unescape them if you need it - then you'd do something like this:
<xsl:for-each select="$currentPage/ancestor::root//homepageslider[@isDoc]">
<xsl:variable name="imageId" select="sliderImage" />
<xsl:if test="normalize-space($imageId)">
<xsl:variable name="image" select="umbraco.library:GetMedia($imageId, false())" />
<a href="{umbraco.library:NiceUrl(@id)}">
<img src="{$image/umbracoFile}" rel="{$image/umbracoFile}" alt="{@nodeName}" title="<h2>Total Hub <em>your great service comes from our great service</em></h2>" />
</a>
</xsl:if>
</xsl:for-each>
Xslt html in an attribute - Help
Hi Edward,
You can not have real HTML in an attribute, but you can escape the tag-delimiters and have the receiving end unescape them if you need it - then you'd do something like this:
/Chriztian
Thanks Chirztian. I had tried this but not sure how to get it to output unescaped?
Ignore my previous comment! I had an issue with my sliders js which was adding confussion to the issue. All sorted now thanks!
is working on a reply...