Welcome Guest, Not a member yet? Register   Sign In
Load Navigation Bar Controller For Every Page Automatically
#2

[eluser]boltsabre[/eluser]
Quote:I am already have $this->load->library(‘tank_auth’); in each __construct.
Why not then just autoload it in config/autoload.php???

Quote:Basically I need a universal controller that calls the tank_auth model to retrieve variables for a navbar sign in modal.
What your after is a "MY_Controller". There are a gazillion blog posts, threads on here and stackoverflow about how to do this, so I'll let you do your own research on that one, but it's what your after.
One little hint, inside the MY_Controller you'll want to use $this->load->vars() to get your two variables accessible in your views without needing to manually pass them in from every controller. So research that as well ;-)


Messages In This Thread
Load Navigation Bar Controller For Every Page Automatically - by El Forum - 06-11-2013, 04:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB