[support] Dynamically display menu items?

Ms. Nancy Wichmann nan_wich at bellsouth.net
Tue Jun 7 20:46:23 UTC 2011


Gee, I'd go low tech and use a custom "access callback" function. "My project" would, for example use the TRUE return, and "Available projects" would negate the return value. Try to keep the logic simple because it may be invoked as often as every page request. If it is more complex, you could add a flag to $user->data in the project assignment code.
 
Nancy
 

Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.



>________________________________
>From: toon severijns
>
>
>Let's i want to display or not display a menu item depending on some property of the logged in user. E.g. when my user has selected a project (i.e. a reference to the project can be found through the user) i want to display a menu item "my project", if not i want to display a different menu item "available projects". How do i do this? Context? Rules? Menu hooks?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110607/43d52c61/attachment-0001.html 


More information about the support mailing list