On Your Site
Local Development
Site Code
Guides
Site Configuration
Content Management
Forms
Form API
Templates
Site Config
Settings
Settings are configurable in the Dijon Platform administration dashboard but it
can also be useful to set defaults in your site_config.php
especially when you
are using the settings in your templates.
setSettings
Settings are identified by a hierarchy string seperated by full stops. Our
example below sets default settings for our standard
template. You can create
settings for your own template in the same way.
Example
$config->setSettings([
'settings.giftaid' => true,
'settings.template.standard.opt_in.default_checked' => true,
'settings.template.standard.opt_in.position' => 'below',
'settings.template.standard.opt_in.variant' => 'email',
'settings.template.standard.opt_in.class' => 'text-sm',
'settings.template.standard.reference' => false
]);