Some people, when confronted with a problem, think ``I know, I'll use regular expressions.'' Now they have two problems.
Automenu.module: automatic menu parenting for Drupal 5.x
I've had a couple projects that needed the menu system to stay open when a full node was being displayed. The Drupal menu system, while dynamic and mostly awesome, didn't seem to allow for that, at least not in the way that I needed it to. So, I wrote Automenu.
For each content type, Automenu allows an administrator to set a default parent in the menu system. If a node is given an entry in the menu system, that default parent is ignored. Relatively simple.
To illustrate, let's say you'd like all nodes of type 'news' to show up under an entry in Primary links called 'Newsroom,' but you don't want to actually create an entry in the menu system for each one. Automenu will do that for you, specifically without creating additional entries in the menu system. If you want to give an individual news node its own special place in the menu system, you can still do that the standard way.
Give it a shot!
Thanks to merlinofchaos and the folks in the #drupal IRC channel for steering me in the right direction on this. They're a bunch of great and helpful folks.
| Attachment | Size |
|---|---|
| automenu-5.x.tar_.gz | 1.96 KB |







Comments
I am not getting this to work yet. Where do you enable it once it is running as a module?
This module works well, with one exception:
When you are viewing a full node, it kills off the nodes tabs. I think this is because the MENU_LOCAL_TASK tabs are being built from the active menu item rather than the node.
Good, would be good to extend it to filter "Parent item:" options when editing a node type.
Any Idea how this can be done?
Thaks
The link doesn't seem to be working to download this module...is it still available?
7 February 2007
9 weeks 8 hours
Due to an unusually large amount of comment spam on this entry (even after changing captchas!) I'm disabling comments here. If anyone needs to chat about this module, please don't hesitate to email me (tom) or chris AT echoditto DOT... well, you know the rest.