There are things in companies sites that never change (name of a society, facebook link, address …).
So I would like to be able to save those things as constants each time I initiate a new site in my cms (cakephp 3.x).
So users can easily add their facebook link by typing something like [FACEBOOK] in any page.
Until now, I hard coded those parameters in a custom bootstrap file (with configure::write() ) but I would like to be able to write them through a form.
Is there a way to do this ? (I personally did not find)
If you want them to be dynamic you will have to somehow store them, either in database, filesystem,…
If the idea is to read them from constants or using Configure::read(), maybe you can generate a .php file that you load in, for example, your bootstrap.
Or use database and then use some cache strategy to avoid querying for the same values every time.
Not a Cake related question at all but a general one.
Thank you for your answer.
I know how to to that right in php. I just wanted to know if there was a better cakephp way.
Thank you again.
maybe something like https://github.com/cakemanager/cakephp-settings
Not really what I was looking for but very interesting.
Thank you for this link.