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.

CommentFileSizeAuthor
#1 menutree5-1.patch3.57 KBowen barton
menutree-1.patch4.01 KBowen barton

Comments

owen barton’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
StatusFileSize
new3.57 KB

As promised, here is a patch for the Drupal 5 branch

Crell’s picture

Status: Needs review » Fixed

Applied 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.

owen barton’s picture

Nicely. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)