Implementation
Create a single navigation.xml that contains the menu structure for
the entire document tree. Add all items and sub-items.
For items that can collapse when you are not browsing them, add collapse="true"
to the item declaration.
Now the menus will expand and collapse as you navigate through them.
Caveats
-
You must refer to subdirectories as /folder/index.html. Navigation will get quite confused
if you refer to them as /folder/ or just /folder
-
If you have a sub-item with the same url as another item, the site navigation will
expand to display all items with that URL (when either is selected). All instances
of the item will be highlighted.