Linking to an external URL within title of an article
This is an open discussion with 1 reply, filed under XSLT.
Search
I think you should try either something link this:
<a href="{link-site}"> <h3><xsl:value-of select="link-title"/></h3> </a>
or – if you still want/need to use xsl:attribute – you have to wrap it around xsl:value-of select="link-site" in order to make it working:
<a> <xsl:attribute name="href"><xsl:value-of select="link-site"/></xsl:attribute> <h3><xsl:value-of select="link-title"/></h3> </a>
Create an account or sign in to comment.
I'm not sure if I have worded this correctly, but lets say I have a page called "links" with three sections. I have the Title, the body, and then the url.
the title is named "links-title", the body is "links-content" and the url is "link-site".
Basically I want my "links-title" to be the text for the link, and then the "link-site" to be the actual url.
Basically <.a href="www.google.com"> google where "www.google.com" is the "link-site" and "google" is the "links title".
This is what I've tried :
But it doesnt quite work out. I know I'm missing something here, an I apologize if this is basic stuff, but im new and i'd appreciate any help I can get.
Thanks.