Selectable Buttons
Selectable Button fields allow publishers to choose either multiple or single items from a list depending on the setting.
note
The following examples use a field named buttons_field
. This should be replaced with your field name.
- Twig
- Blade
{{ entry.buttons_field }}
{% for value, label in entry.buttons_field.options %}
{{ label }} - {{ value }}
{% endfor %}
{% for value, label in entry.buttons_field.selected %}
{{ label }} - {{ value }}
{% endfor %}
{{ $entry->buttons_field }}
@foreach($entry->buttons_field->options as $value => $label)
{{ $label }} - {{ $value }}
@endforeach
@foreach($entry->buttons_field->selected as $value => $label)
{{ $label }} - {{ $value }}
@endforeach
Parameters
- Twig
- Blade
{{ entry.buttons_field.parameters({limit: 1, markup: 'ul'}) | raw }}
{!! $entry->buttons_field->parameters([limit: 1, markup: 'ul']) !!}
info
See the ExpressionEngine Documentation for more information on the Selectable Buttons fieldtype