CodeIgniter Forums

Full Version: Programming Advice : Best way to pass global variables to ME Modules?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I am using the Modular extensions system to break my application into modules with a front end and back end controller e.g.


My questions is what is the best way to pass global variables to all the controllers? I have set up a settings controller and also a settings library but I think it is overkill.

The settings will include the site information e.g. company name, details etc and mainly the modules I am using. I want to create a list of arrays in a central location that I can edit for future sites. This will be done by me or another developer so at the moment using a DB isn't required.

Any advice is appreciated.


El Forum

This thread may or may not help you.

El Forum

I am using the SimpleTemplate library and after reading the manual found out I could use $this->template->set('variable', $variable);

But thanks for the link I'll have a read