Closed testt23 closed 3 years ago
Ensure you are using the correct model in the frontend: https://luya.io/api/luya-admin-models-Config (there are mulitple config models... sadly)
using Config::get('') definitely works, because we are using this often too. Ensure you are on the latest luya versions for cms and admin. if it still does not work you have to provide more informations like stack trace and screenshot.
and yes, the Config
section in the admin area is definitely a good place for such global environment settings, and accessing those config with \luya\admin\models\Config::get('youridentifier')
:+1:
@nadar this is working correctly: <?= \luya\admin\models\Config::get('phone'); ?>
Thanks very much. I have add translate for Bulgarian users, review and approve them if you wish. :)
Thanks +1
sure, please send us a pull request :+1:
I dont know, but I make a file in: https://github.com/luyadev/luya-module-admin/tree/master/src/messages /bg/ https://github.com/luyadev/luya-module-cms/tree/master/src/frontend/messages /bg/ https://github.com/luyadev/luya-module-cms/tree/master/src/admin/messages /bg/
but I dont see here? Wow :( ?
Congratulations on still maintaining and upgrading this wonderful system for us! I have the following problem. In the administrative panel I create additional settings in the “Config” module: address, phone
I’m trying to get them in the frontend part like this: <? = Config :: get ('phone'); ?> however, the whole site “bugs” and gives an error. I need it so that I can correct it in case of a change of company address or company phone number. Since such options are missing in CMS Settings, I decided that it might be done through the Config module … but unfortunately it does not work.
Thanks for helping me.
LUYA Check ouput (run this script and post the result: luyacheck.php)
Additional infos