CodeIgniter Forums
Dynamic menus for different kind of users - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Dynamic menus for different kind of users (/showthread.php?tid=45872)



Dynamic menus for different kind of users - El Forum - 10-10-2011

[eluser]Unknown[/eluser]
Hello,

I need to create different menus for different users based on their roles. For this, one approach I get is to make a separate view of header and add it in all views. Through this view will call a controller which will generate a menu through DB and return to this view. In this case each time the page is changed request will go to DB which will cause slow response of page.

Is there anyway to store HTML of menu (globally) when user logs in and just access this variable each time as page changed??

Thanks