In a concrete5 website, where is the best place to store global variables that you would like to access site-wide across templates and controllers etc.?
e.g. A specific external URL, a Facebook ID, some kind of version number, etc.
In a concrete5 website, where is the best place to store global variables that you would like to access site-wide across templates and controllers etc.?
e.g. A specific external URL, a Facebook ID, some kind of version number, etc.
If you want to do this in code (as opposed to via the CMS), you can put this in application/config/app.php
:
<?php
return [
'FacebookAppId' => '1234',
];
And then in controllers/templates you can retrieve it via:
<?= Config::get('app.FacebookAppId') ?>