Nice filter :)
Coincidentally, Marc committed a similar filter a few days ago as well,
called menu_subtree. That one not only gets the direct children, but
everything under a certain page.
I'll check the difference between the two and see if yours can be included.
cheers,
Arjan
Yes, that is a very big coincidence!
Apparently we both have a need for the submenu at the same time!
Difference is that my filter works on the "menu" property (and not the direct id) and returns the sub-menu.
The idea of my filter was to get the sub-menu for navigation on simple devices that can't display the complete menu.
It is only committed to the 0.9dev master and is called "menu_subtree":
> menu_subtree:
> Finds the menu below a particular resource id.
> Usage: m.rsc.main_menu.menu|menu_subtree:id
Best,
Marc
We have two options for that:
1. Return the path together with the submenu
2. Make a separate filter to find the path
What would be best? (obviously #1 is less work for the server)
- Marc
- Marc
Is it possible to have the menu scomp mark a menu item as current
while in a sub-menu page?
It sets the the class to 'current' on the menu items that are in the trail.
- Marc