[development] Change menu structure at runtime

Fernando Silva fsilva.pt at gmail.com
Thu Nov 6 16:35:44 UTC 2008


Hi,

I want to do a "strange" thing with the (Drupal 6) menu system.

After defining a menu structure, let's assume that it is a "primary
navigation", when viewing a node page I want that page to be under a
specific menu item in the menu "primary links".

See this:
- primary navigation
-- menu 1
-- menu 2
-- menu 3
---- node/80 (this will be changed at runtime)

That "node/80" path will be the child of a menu item, according to
some conditionals that I have in hook_nodeapi. So the question is: can
I alter the menu structure at runtime, while not changing database or
persisting those changes?

Or perhaps there is another solution...

Thanks,
  Fernando


More information about the development mailing list