Here's some paths I'm using in my module
- control (this isn't really a page, it just goes to the next item)
- control/jobs (provides list of jobs)
- control/jobs/% (path for editing a particular job)
- control/download (separate page)
- control/settings (separate page)
I would like a simple menu that shows jobs, download and settings. I would like it to add the 'active' class when visiting the page. And when visiting a particular subpage (e.g. a particular job), I would like the parent menu items to have an "active-trail" class or such.
Using hook_menu
I've created these menu items, all as MENU_NORMAL_ITEM
s and I've put them in a new menu called menu-control. I've added this menu's block to my page. I get the menu items listed. But when I visit a particular job, there is nothing to indicate I'm on a child page of 'jobs' (or indeed, 'control').
This seems like the simplest implementation of a menu and I've been hacking at it for weeks (on and off!). Can anyone help?