Skip to content

Kirby 4.2.0


Registering options

Options are registered with the options extension. The extension accepts an array of options with their default values. The default values will be used if the options are not overwritten in the site config.

Kirby::plugin('yourname/yourplugin', [
    'options' => [
        'option' => 'some-value',
        'another-option' => [
            'with-a-nested-option' => 'and values'

Setting custom options in the site config

See the guide.

Accessing option values

Config options can be used anywhere in Kirby with the $kirby->option() method:


Or with the option() helper: