Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

Toggle Fieldtype

A nice little toggle switch generally used to manage settings-type variables. It stores true or false and is delightfully uncomplicated, just like our relationship with yogurt.

Toggle Fieldtype UI
The Toggle Fieldtype in action!

Data Structure

Flicking the toggle to the right sets to the value to true, left to false.

do_the_thing: true

Templating

Toggles are usually used to control logic, so you can combine them with {{ if }} statements in your templates to handle all manner of show/hide wizardry.

{{ if do_the_thing }} It does it {{ /if }}
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →