{{$idx = 0;}}
{{$showAsGrid = ( count( $input->options['options'] ) > 3 ) ? true : false;}}
{{foreach $input->options['options'] as $option => $text}}
{{if $option == 'all'}}
{{continue;}}
{{endif}}
{{if $showAsGrid && $idx % 2 == 0}}
{{endif}}
{{if $showAsGrid}}
{{endif}}
value == $option}}checked{{endif}} {{if isset( $input->options['toggles'][ $option ] ) and !empty( $input->options['toggles'][ $option ] )}}data-control="toggle" data-toggles="{expression="implode( ',', $input->options['toggles'][ $option ] )"}"{{endif}}>
{{if $showAsGrid}}
{{endif}}
{{if $showAsGrid && ( $idx % 2 != 0 || $idx == ( count( $input->options['options'] ) - 1 ) )}}
{{endif}}
{{$idx++;}}
{{endforeach}}