Welcome Guest, Not a member yet? Register   Sign In
Load the same libraries in every controller?
#1

[eluser]Lpeek[/eluser]
Hey, I'm just getting started with CI, and just wondering whether I can do any kind of global load for controllers. I know I could go and edit the main system controller but I really dont want to do that.

The reason being that on every page of my site, I will be loading the header, which needs the session and cart libraries. There is no page on the site that wont have a cart summary.

Would the normal way be to just load the same things and same views etc in every controller? or is there a way to reuse this kind of functionality? Maybe I could create a header library/helper? and do everything relating to the header/cart in that before loading that within every controller?

Thanks!


Messages In This Thread
Load the same libraries in every controller? - by El Forum - 10-25-2012, 08:32 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 09:07 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 09:10 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 09:11 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 10:12 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 10:15 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 10:28 AM
Load the same libraries in every controller? - by El Forum - 10-25-2012, 10:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB