Hi Christoffer,
I might be missing something by your XSLT actually looks over complicated. I'm pretty sure you can create the same menu using the following XSLT.
Code:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage"/>
<xsl:variable name="level" select="1"/>
<xsl:template match="/">
<div class="navtree">
<ul><li><a href="/">Home</a></li></ul>
<xsl:call-template name="printListe">
<xsl:with-param name="node" select="$currentPage/ancestor-or-self::node [@level = 1]"/>
<xsl:with-param name="id" select="string('treemenu1')"/>
</xsl:call-template>
</div>
</xsl:template>
<xsl:template name="printListe">
<xsl:param name="node"/>
<xsl:param name="id"/>
<xsl:if test="$node/node [string(./data [@alias='umbracoNaviHide']) != '1'>
<ul>
<xsl:if test="$id != ''">
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
</xsl:if>
<xsl:for-each select="$node/node [string(./data [@alias='umbracoNaviHide']) != '1']">
<li>
<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>
<xsl:if test="count(./node) > 0">
<xsl:call-template name="printListe">
<xsl:with-param name="node" select="."/>
</xsl:call-template>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
I use the above on our site for a top menu, but you could just modify the CSS to display the menu on the left. On our site I have also wrapped the menu in a table so that I could add the silly little corner graphics ;) I have remove that from the above XSLT.
You can see the menu on our site:
http://Added Value Applications LtdBest regards,
Chris
Chris Houston - Business Dev Director for
Ava / CTO for Clik Media Group / Umbraco Developer