I have several custom menus that link to Pages in my Drupal 7 site. One custom menu is called Announcements. When I visit a Page that is linked in the Announcements menu, I would like to display in the sidebar the other links that are in the Announcements menu. I don't want to have to create a menu block for Announcements and manually maintain a list of nodes on which to show the menu block, to make it show only on the Announcements pages. How can I dynamically list links from the custom menu that links to the current page?

It would also be nice if...

  • I have a page called News Archives on which a menu block is displayed for the Announcements menu as well as some other menus. It would be nice to have a custom breadcrumb for any Page linked in the Announcements menu like 'Home > News Archives > [the current page]'. I have the Custom Breadcrumbs module installed, if someone can think of a way to use this for this purpose.

  • The Pages in a given menu don't have any pattern to their URL, or hierarchy. Many of them are just off the root site, e.g., http://mysite.com/page_linked_in_announcements_menu. Is there any way to dynamically change a Page's URL alias to reflect which custom menu it belongs to? So on the edit page for a Page, the URL alias might be "blah", but it's linked in the Announcements menu, so I can access it at /announcements/blah. Then if I moved "blah" to My Other Custom Menu, its URL would automatically become /my-other-custom-menu/blah, without me having to edit the URL alias by hand.

This is a cross-post from Stack Overflow because I didn't know how to port the question over.

2 Answers 2


This best approach in this regard can be a single multi level menu along with Menu Block module.

Top level menu form main navigation to sections while first level children appear as section items menus. Menu Block configured with 2nd level items chooses second level items siblings of current active item.

  • Are you suggesting I have my standalone Announcements menu as just a child node under the regular Main Menu? If so, can I hide Announcements so it doesn't show up in my main navigation? Oct 28, 2011 at 21:56

For the automatic menu items, there is a nice little module called Auto Menu. Unfortunately the port to Drupal 7, is still in progress.

I found that you can get the same results using Node Auto Term and Taxonomy Menu.

As to the URL pattern, you should use pathauto, they have many tokens you can use. For example you could setup a taxonomy for each menu custom menu (if you do this you won't need to create the menu manually because the Taxonomy Menu module can do it for you). You can use the token for that taxonomy in the pathauto urls, and then setup pathauto so that it changes the node's path when there is changes (it won't do this by default, it will keep the first set path).

Wit this setup if you change the taxonomy for the node you would see the url change and the menu item created on the correct menu.

**update: I would use Breadcrumb Menu for breadcrumbs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.