How to use yes/no


I set a yes/no field and want to use it to feature certain uploads on a dataset. How do I set up the call for this?


Hey Gissel, you can refrence a yes/no field the same way you reference most other fields in Zesty. {{ page.yes_no_field }}. The difference is, it will either give you a 1 or a 0 depending on whet’s selected in the Content section. So to use it to feature only certain content from a dataset you’re probably going to want to use it as a “where” statement inside your each loop.

{{ each dataset as item where item.yes_no_field = 1 }}
** content **
{{ end-each }}