Sub-navigation changes as user goes deeper into site?
Hi, I'm using this xslt code:
<xsl:for-each select="$currentPage/* [@isDoc]">
<ul>
<li>
nodename
</li>
</ul>
</xsl:foreach>
When I navigate past the secondary pages of the product site I'm working on, the sub nav changes to a list of products instead of the original options. Is there a way to maintain the initial sub nav?
The reason to why the list changes, is because the "currentPage" changes. Your xslt code you wrote lists the child nodes of the current node. So when you are on the frontpage you'll get the subpages from there... when you go to a page without subpages you will get no output at all.
So, as Dan point out, you'll have to specify from where the xslt should get its data from.
Sub-navigation changes as user goes deeper into site?
Hi Philip,
You'll need to set your XSLT to retrieve nodes by level. There's an XSLT template already for this, which should output something like the following:
This is assuming you're using the new schema in 4.5.1.
Hope this helps...
The reason to why the list changes, is because the "currentPage" changes. Your xslt code you wrote lists the child nodes of the current node. So when you are on the frontpage you'll get the subpages from there... when you go to a page without subpages you will get no output at all.
So, as Dan point out, you'll have to specify from where the xslt should get its data from.
- webspas
is working on a reply...