[development] Two tiered menus in D7 when the top level is user specific
Bill Fitzgerald
bill at funnymonkey.com
Tue Mar 22 14:04:16 UTC 2011
Is there a reason that having multiple menus, and controlling their
display via context, would not work here?
On 3/21/11 5:55 PM, Rob Thorne wrote:
> I'm looking into a two tiered menu in a D7 application where the second
> level of the menu is standard, but the top level is different for every
> user.
>
> To make this concrete, suppose the user is a teacher at a school where
> the teacher uses multiple rooms, and needs to order materials for each
> room separately. Each teacher has a separate list of rooms, but the the
> pages we track -- class lists, crafts inventory, furniture... are the
> same for each room.
>
> So for teacher A, we might have a set of menus like this:
>
> * Room 220
> o Class List
> o Crafts Inventory
> o Furniture
> * Room 221
> o Class List
> o Crafts Inventory
> o Furniture
>
> and so on. It's clear to me how to do a loader function and menu
> handler for a link like 'teacher/%teacher/room/%/class_list', but I
> don't see how to populate the level of the menus for '220' and '221' in
> the 3 position.
>
> In Drupal 5, I used to use the !$may_cache argument for these sorts of
> things. I'm not arguing that this was efficient, but it did work. What
> hooks would I need to use in addition to hook_menu to make this work in
> Drupal 7?
>
> Thanks,
> Rob Thorne
> Torenware Networks
>
More information about the development
mailing list