Warning: file_put_contents() [function.file-put-contents]: Only 0 of 196 bytes written, possibly out of free disk space in /disk2/home/symphonyweb/public_html/extensions/xmlfield/fields/field.xml.php on line 63
“Alternative Navigation” – XSLT Utilities – Download – Symphony.
Author:
rainerborene
Version:
0.1
Release Date:
13 Feb 2011
Category:
Output

Description

Just use call-template and you’re done.

XSLT

View Raw
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:exsl="http://exslt.org/common"
	extension-element-prefixes="exsl">

<xsl:variable name="menu">
	<item handle="home">Home</item>
	<item handle="about">About</item>
	<item handle="contact">Contact</item>
</xsl:variable>

<xsl:template name="navigation">
	<ul class="grid_3 alpha nav">
		<xsl:for-each select="exsl:node-set($menu)/*">
			<li>
				<a href="{$root}/{@handle}/">
					<xsl:if test="$current-page = @handle">
						<xsl:attribute name="class">selected</xsl:attribute>
					</xsl:if>
					<xsl:value-of select="text()"/>
				</a>
			</li>
		</xsl:for-each>
	</ul>
</xsl:template>

</xsl:stylesheet>

Discuss this XSLT Utility

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