silverstripe/silverstripe-docsviewer — pull request #19 by Martimiz (2012-11-12 15:10:46+00:00)
Title: Allow for either nested or separate submenu form template. 

This code allows for the submenu to be generated from template instead of by JavaScript - either in a separate block or nested. It also lets you enable the built-in recursion.

Default setting: separate submenu block, no recursion.

It uses 'CurrentLevelOnePage' to contain the page selected in the toplevel and get its children to populate the submenu. A separate getSubmenuLocation() function tells the template where to place it.

Recursion will fetch all childeren for all submenu's, to enable javascript-driven menus (script not included). When recursion is enabled, the separate menublock is automatically disabled.

Note: recursion seems to work allright, and a javascript driven menu as an option could work well for smaller sites.