In previous versions of umbraco i was umbraco to create a submenu by containing something like the following inside an outer foreach. Can i not use ./node in 4.5?
<xsl:for-each select="./node [@nodeTypeAlias = 'Content'] [string(data [@alias='umbracoNaviHide']) != '1']">
<li class="">
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:if test="$currentPage/@id = current()/@id">
<!-- we're under the item - you can do your own styling here -->
<xsl:attribute name="class">sel</xsl:attribute>
</xsl:if>
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
<xsl:for-each select="./Content [@isDoc] [string(umbracoNaviHide) != '1']">
<li class="">
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:if test="$currentPage/@id = current()/@id">
<!-- we're under the item - you can do your own styling here -->
<xsl:attribute name="class">sel</xsl:attribute>
</xsl:if>
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
The snippet you posted looks a lot like the default XSLT snippet provided by Umbraco, so if you just choose the "navigation" snippet during creation of your XSLT file you'll get the new syntax served for you directly.
As Rich mentions the schema has changed in version 4.5 - however if you for some reason need to use the old schema you can change it to run legacy in the umbracosettings.config file.
displaying submenu in 4.5
In previous versions of umbraco i was umbraco to create a submenu by containing something like the following inside an outer foreach. Can i not use ./node in 4.5?
Hey,
There is no nodeTypeAlias any more http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/no-more-@nodetypealias
Here is your code for 4.5 converted here http://blackpoint.dk/umbraco-workbench/tools/convert-xml-schema-to-45-.aspx?
Rich
Hi Anthony
The snippet you posted looks a lot like the default XSLT snippet provided by Umbraco, so if you just choose the "navigation" snippet during creation of your XSLT file you'll get the new syntax served for you directly.
As Rich mentions the schema has changed in version 4.5 - however if you for some reason need to use the old schema you can change it to run legacy in the umbracosettings.config file.
/Jan
is working on a reply...