Setting whether content should be featured or highlighted on a page
Including content in site navigation or mobile-specific display
Enabling comments, social sharing buttons, related posts, or newsletter forms
Indicating whether items are in stock, on sale, new, or part of a promotion
Showing or hiding sidebars, optional themes, dark mode, breadcrumbs
Use descriptive field names that indicate the “true” state. Names like is_featured, show_sidebar, or enable_comments make it clear what checking the box does.
Content like Collections and Pages can even be filtered by your Checkbox fields when queried from the API via the fields. query parameter, e.g., fields.is_featured=True
from butter_cms import ButterCMSclient = ButterCMS('your-api-key')response = client.pages.get('*', 'blog-post')post = response['data']['fields']# Boolean values are Python True/Falseif post['is_featured']: print('This is a featured post!')# Conditional logicsidebar_class = 'with-sidebar' if post['show_sidebar'] else 'full-width'