Using common functionality in all pages (frame) of a CI site

#4
[eluser]TottoBG[/eluser]
[quote author="Dam1an" date="1243095513"]Hi
If you have some quieries/logic which is common to every function your controllers, you can extend the CI Controller with your own MY_Controller and then use this for your controllers.
You can then put all common login into the constructor there

There are plenty of threads already covering this in the forums, so a search for "MY_Controller" should bring up a few useful threads[/quote]
Thanks Dam1an,
I'll digg into the mentioned threads here in the forum about extending the Controller. But at least such a scheme should give a result. The different pieces of common logic (blocks with some data) may be loaded by methods of the My_Controller class, called by it's constructor - so they would be initialized for the siteframe view, that all the other controllers fill.

Thanks again for the direction!


Messages In This Thread
Using common functionality in all pages (frame) of a CI site - by El Forum - 05-23-2009, 05:33 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.