I have a config in my site.yaml file:
TXT
git_changelog: https://domain.com/api/v3/repos/repo/releases
and I want to read it in as a variable in my plugin. I tried to use:
PHP
$config = $grav['config']->get('site.git_changelog');
but get an error.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
I have a config in my site.yaml file:
git_changelog: https://domain.com/api/v3/repos/repo/releases
and I want to read it in as a variable in my plugin. I tried to use:
$config = $grav['config']->get('site.git_changelog');
but get an error.
Listing the error would help, but this works in 1.4.1: $this->grav['config']->value('site.title'). Or, if you need to return it in a static function, for example when called by a blueprint: Grav::instance()['config']->value('site.title').
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 60 | 16 hours ago | ||
| 2 | 66 | 19 hours ago | ||
| 1 | 34 | 20 hours ago | ||
| 2 | 70 | 6 days ago | ||
| 2 | 61 | 6 days ago |