Primary Menu with URL Alias - Not working as expected

gclift - March 27, 2008 - 18:28

In a site I'm developing, I'm trying to use the primary menu with using URL aliases. The problem I'm having is using a custom module with a different path than the alias stored in the menu. When clicking on the aliased link to the custom module, the primary menu only returns the top level. After digging around the menu.inc file for awhile (looking at menu_tree_page_data), it appears Drupal is querying for the parent from the url or querying the tab_root from the router.

BACKGROUND
I built a small module called showcases which have a small and large image the user can click on to enlarge. The module path is 'showcases' followed by a named key 'options'. I wish to make the site navigation using the Primary Menu. Using aliases for friendly urls. Everything works great until I click on the products/options or products/layers and the menu only shows the first level.

QUESTION
How can I build out the menu and have secondary links point to aliases and have the primary menu show first levels AND second levels?

URL ALIAS
ALIAS LINK
----------------------------
products node/25
products/options showcase/options
products/layers showcase/layers

PRIMARY MENU
_________________________
home
products
products/options
products/layers
company_information
company_information/about_us

Thanks,
Gary

 
 

Drupal is a registered trademark of Dries Buytaert.