external config file for homepresenter
- kolaloka
- Member | 71
I need to create an external config file where a web admin can change some variables. I do not know how to set the /path/to/my/config/
Also where to put it and how to use the variables in presenter functions?
My idea is something like this:
config.php:
HomePresenter.php:
Please, help.
- CZechBoY
- Member | 3608
OK, then you can use neon file, or php script or other format…
Only thing you should do is to load that configuration file(s) in bootstrap.php
[https://doc.nette.org/…on/bootstrap#…]
like this
And put there some parameters
like this
For more info read the whole DIC page https://doc.nette.org/…introduction
Last edited by CZechBoY (2018-06-04 10:27)