>
> Now, how do I prepare such menu in my controller and then implement it in
> the view? What's the best way?
>
(somewhere in the model)
custom_menu = None
(at the top of the controller)
if not auth.user:
custom_menu = MENU(...) # dirty fork menu
elif auth.has_membership(role="group 1"):
custom_menu = MENU(...) # vavarian menu
elif auth.has_membership(role="group 2"):
custom_menu = MENU(...) # mr. Creosote's menu
Then you write into the scaffolding layout.html at the sidebar div:
{{if custom_menu:}}custom_menu{{pass}}
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.