Plugin

Settings

setting

The setting function returns a decorated field type for the setting value or null if not found. The key argument should be the desired setting's key.

The presenter returned depends on the field type used for the setting.

{{ setting(key) }}

{% if setting('streams::system.force_ssl').isTrue() %}
    <p>You are forcing SSL.</p>
{% endif %}

setting_value

The setting_value function returns a raw setting value or default if not found. The key argument should be the desired setting's key.

{{ setting_value(key, default = null) }}

{% for locale in setting_value('streams::locales.enabled', []) %}
    <p>{{ locale }} is enabled.</p>
{% endfor %}