Toggle
Toggle is a fieldtype for storing yes/no or on/off data.
note
The following examples use a field named toggle_field
. This should be replaced with your field name.
- Twig
- Blade
{{ entry.toggle_field }}
{% if entry.toggle_field == '1' %}
Yes
{% else %}
No
{% endif %}
{{ $entry->toggle_field }}
@if($entry->toggle_field == '1')
Yes
@else
No
@endif
info
See the ExpressionEngine Documentation for more information on the Toggle fieldtype