Search

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 :

<.a>

 <.xsl:attribute name="href"/>

<.xsl:value-of select="link-site"/>

<.h3><.xsl:value-of select="links-title"/><./h3>

<./a>

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.

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details