Closed ghost closed 3 years ago
A Theme is just a type of local Package, like is also the Module.
As any Package, a theme has support for having own configuration files. To access those config items, you should use the package namespace, as defined into is ServiceProvider.
For example, to access the configuration items from the AdminLite theme, which have the namespace admin_lite
you can do:
$customColor = Config::get('admin_lite::config.customColor', 'FFFFFF');
Please note the part before ::
which is admin_lite
because this is the namespace of this Package.
This assume that you put the config item into Config.php
from Config
directory. You may use other config files, for example for Colors.php
you can use:
$customColor = Config::get('admin_lite::colors.customColor', 'FFFFFF');
Same logic applies to any Package, and also to the any local variant, be it Theme or Module.
Your explanation allowed me to overcome my problem which and certainly a lack of understanding !. I did not understand the system of the call via the namespace thanks to your example and rereading the lib config I finally understood clearly. if in the config: get () the custmColor value does not exist in color.php config then it takes the default value given as the second argument so 'FFFFFF'. problem solved Thank you
Then, we could consider closed this issue.
Hello how to load the configuration information of a theme under nova 4.2?
I'm looking and can't find any information