Skip to content
Snippets Groups Projects
Commit 0777cbf5 authored by Scott Euser's avatar Scott Euser
Browse files

Update readme for release

parent 031b0566
No related branches found
Tags 8.x-1.3
No related merge requests found
......@@ -61,22 +61,22 @@ How to access the settings in twig templates
--------------------------------------------
Debug your settings when debug is enabled (https://www.drupal.org/docs/8/theming/twig/debugging-twig-templates)
via `{{ dump(settings) }}` or `{{ dump(settings.your_settings_group.your_setting_name) }}` for instance.
via `{{ dump(site_settings) }}` or `{{ dump(site_settings.your_settings_group.your_setting_name) }}` for instance.
Access a non-repeating variable with one field like so:
`{{ settings.your_settings_group.your_setting_name }}`
`{{ site_settings.your_settings_group.your_setting_name }}`
Access a non-repeating variable with multiple fields like so:
`{{ settings.your_settings_group.your_setting_name.field_title }}` and
`{{ settings.your_settings_group.your_setting_name.field_subtitle }}`
`{{ site_settings.your_settings_group.your_setting_name.field_title }}` and
`{{ site_settings.your_settings_group.your_setting_name.field_subtitle }}`
Access a non-repeating variable with multiple fields and complex field settings:
`{{ settings.your_settings_group.your_setting_name.field_date.value }}`
`{{ settings.your_settings_group.your_setting_name.field_date.options }}` etc
`{{ site_settings.your_settings_group.your_setting_name.field_date.value }}`
`{{ site_settings.your_settings_group.your_setting_name.field_date.options }}` etc
Access a repeating variable with one field like so:
`{% for setting in settings.your_settings_group.your_setting_name %}
{{ setting }}
`{% for site_setting in site_settings.your_settings_group.your_setting_name %}
{{ site_setting }}
{% endfor %}`
How to access the settings in php files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment