I need to generate differents menus for my application when login depending on the user role. In order to do this, I need to extract some information from database.
I think the better solution is to code after login the generation of html for the menu and save it on a session variable. Then in my layout i only have to put that session variable and don't have to repeat all the code in all pages.
Am I right?
Where is the better place for coding this?
Thanks!