I reimplemented this module before I realized it existed (sigh!), but then realized that menutree wasn't actually recursing through the entire tree - it calls the regular theme_menu_tree at the second level of the hierarchy, which prevents it from showing deeper levels (since they are closed).
I did some refactoring and fixed this, by making a new theme_menutree_tree function that calls itself correctly.
I also fixed some incorrect comments, the menu access permissions, the page title, and the case where an invalid pid is passed in.
I'll open a new issue for any of these that need to be ported into the D5 release (I don't normally start fixing issues on old versions...but happened to come across this on a 4.7 site).
At some point it would be great to look at adding 'depth' as a second URL argument, so sites can only display the top 2 or 3 levels if they have a very deep menu.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | menutree5-1.patch | 3.57 KB | owen barton |
| menutree-1.patch | 4.01 KB | owen barton |
Comments
Comment #1
owen barton commentedAs promised, here is a patch for the Drupal 5 branch
Comment #2
Crell commentedApplied to the 5 branch, with one change. I kept in theme_menutree_page(), for the added flexibility and because I didn't want to remove a div on someone without warning. Thanks.
Yeah, a depth limiter would be cool. Please submit a new issue for that. :-)
As for 4.7, I don't actually have a 4.7 site to even test with at this point, really.
Comment #3
owen barton commentedNicely. Thanks!
Comment #4
(not verified) commented