Hi I am using codeigniter and I want to use a constant defined in the config>constant file.
For example, my color theme for my view might be blue, so I save this in the constants file.
define('blue', '#3fsefe');
Now I can use this in all my views... works fine.
But what should I do if I want to pull this constant from a database? If you will a dynamic constant. I've read online about extending the controller class
but that seems seriously stupid especially for migration purposes, update to new version.
I also thought about storing it as a session which is persistent across the pages... That works but, it seems retarded.
Any suggestions welcome.