Page 1 of 1

if current page has children do.... ?

Posted: Wed Feb 01, 2006 1:15 am
by kermit
what's the template code needed to display a secondary menu (and some markup before and/or after it) only if the current page has children pages (and those pages are listed as 'active')?

something like:

if current page has (active) child page(s), do this..


On this page
{cms_module module='MenuManager' template="verticalmenu.tpl" start_level="2" number_of_levels="1"}


if not, do nothing (or perhaps something else)...


EDIT (1 feb): interim solution found: i ended up creating a duplicate menu template (on 0.12 daily), adding the markup directly to the menu, and using that 2nd menu template for the secondary menu.

and it works. primary nav is a horizontal bar, secondary (2nd level) nav is a floating vertical menu (when it exists), and if i was to continue on with this kinda messy solution, 3rd level navigation would be in the flow of content (before or after it)... kinda like an overgrown summary/full article or 'read more' type of solution, but with full pages instead (and each can stand on it's own).

be nice to figure out a way to do it without the custom menu templates. the ability to specify the id and/or class that gets assigned to a menu's list and list items would be nice too; instead of using whatever's coded into the template (would allow for multiple instances of the same menu template, perhaps with different display parameters, to be styled differently).