|Kongregate Registration for Free Flash Games and Chat with solprovider|
This describes how to change the menu to show only only the current top-level entry and the documents beneath it.
Put this line in your page2xhtml.xsl:
where you want the section menu, and these matches near the bottom:
The first match copies the menu div if there is a a second level and passes the mode lower.
- Remove the xsl:if to always show the section menu even when there are no lower levels.
The second match copies the menublock-selected-1 div and passes the mode lower.
The third match removes the menublock-1s.
The fourth match changes the menuitem-1 to "In This Section".
- Make it an empty match if you do not want any title. You could add static text (like "In This Section") directly in your HTML, but it would not disappear if there were no lower documents.
- Remove this match if you want the title of the section to appear and be a link when on a lower document.
The fifth match copies everything else.
Some more work could change the class names to use different CSS than the regular menu so both can appear on the same page.
If you want to use this code in several page2xhtml.xsl files, put this code into common-section.xsl and use:
and the placement line in your page2xhtml.xsl files. Using a separate file improves maintenance and code reuse.