Template data title from db |
Hi in my project i use a template .
Wich is the best way to set tag title getting data from db , i would be set in only one function (not in every controller set $data['title'] = .... )? Must i use base controller to do this ?
BaseController makes sense to me. Add a protected var and assign it a value in initController(). Then you can change the value in any other controller as needed.
You could also use CodeIgniters Settings.
Provides database storage and retrieval of application settings, with a fallback to the config classes. CodeIgniter 4 Settings What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |