Use configuration variable in a presenter

materix
Member | 66
+
0
-

In bootstrap.php I have $configurator->addConfig('config.neon');.

Let say I add a custom value to config.neon, e.g. “appname:MegaSite”, and want to use this variable in a template.

How do I reference a variable from configuration in a presenter?

David Grudl
Nette Core | 8139
+
0
-

Pass it to the presenter https://blog.nette.org/…-to-services

materix
Member | 66
+
0
-

Thanks, it worked!

Dependency injection is the most difficult part of Nette to understand, but I am getting there :-)