<!-- The fun starts here --> <ul> <xsl:for-each select="$currentPage/node [@nodeTypeAlias = $documentTypeAlias and string(data [@alias='umbracoNaviHide']) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul>
</xsl:template>
Ive inserted this on my master template, but it only display on the frontpage of the site. It dissapears on all other pages. I guess i should be using some kind of $currentPage/ancestor-or-self::node but what is the correct syntax?
Thanks for the effort, but it doesnt seem to work. Now the menu doesnt display on any page... not even the frontpage which worked before... Any idea why?
menu from document type
im trying to make a small secondary menu. im using the prdefined xslt for listing pages by document type:
<xsl:variable name="documentTypeAlias" select="string('Kontaktmenu')"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="$currentPage/node [@nodeTypeAlias = $documentTypeAlias and string(data [@alias='umbracoNaviHide']) != '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
Ive inserted this on my master template, but it only display on the frontpage of the site. It dissapears on all other pages. I guess i should be using some kind of $currentPage/ancestor-or-self::node but what is the correct syntax?
hth, Thomas
Hej Claus
Try writing this instead
/Jan
Argh, I'm just too slow! :)
yeah, the first time I was faster...
*g*
Thanks for the effort, but it doesnt seem to work. Now the menu doesnt display on any page... not even the frontpage which worked before... Any idea why?
Solved it. Example below
<xsl:variable name="level" select="1"/>
<xsl:variable name="documentTypeAlias" select="string('Kontaktmenu')"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1' and @nodeTypeAlias = $documentTypeAlias ]">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
is working on a reply...