Fairly typical menu structure such as
Home
About Us
Overview
Management
Contact
Products
Services
The default settings display all of those items in one column. I can set recursive to "1" and then only the 4 parent items are displayed. Overview, Management, and Contact are not.
Is there a way that I can display those child items on pages they are associated with?
For example, every page would have the Main Menu in the first column with Home, About Us, Products, and Services. But if someone were on the About Us page, or any of the About Us child pages, they would be able to see a second footermap menu column that displays just those child items.
thanks
Comments
Comment #1
mradcliffeNot without a lot of template_preprocess or template hackery.
I think you could do this by not having a recurse limit, and then in the template checking where things are with the #level property.
You should theoretically be able to loop through $footermap['main-menu'][$child]['#items'] and check the #level to see if it's less than 2 (or 1?), and then add that to a new #items array that you will set later. Take anything higher than that, that matches the base path of menu_get_active_menu_names() and stick it into a new child array's #items.
So I think you'd end up with a render array like this:
I'll probably need to document more about the theme function.
Comment #2
mradcliffe