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 | 53 | 9 hours ago | ||
| 2 | 59 | 12 hours ago | ||
| 1 | 30 | 13 hours ago | ||
| 2 | 65 | 5 days ago | ||
| 2 | 56 | 5 days ago |