Anywhere in your template you can reference an early parsed global variable for each feature flag to determine if content shouldbe shown. In this example if the new_product feature flag is enabled and active, then the text will be rendered.
<p>Show me the money!</p>
If a Feature Flag field is added to a channel you do not need to modify your template to show or hide the entry content. For example, the following custom field is added to a channel, and when editing an entry you will see in plain text what it wants to do. If the last dropdown option is set to "Hide" this entry, then the
channel:entriestag will automatically remove the entry from the result loop if the
new_productfeature flag is enabled and active. If it is set to show, then it will only display the entry in the
channel:entriestag when the
new_productfeature flag is enabled. If it is not enabled, it will skip the entry when looping over the
A Feature Flags field when used as a channel field is the only time you won't be required to add a template conditional tag to show or hide your content.
If you add a Feature Flags field to Bloqs or Grid you will need to add a conditional to your template tag for this to work. For example we have 2 Conditional Display bloqs below. The first will display itself and it's child bloqs if the new_product feature flag is enabled and active. The second will not display itself or it's children if the feature flag is enabled and active.
<!-- Since all the other bloqs are children of the
Conditional Display bloq will display based on the condition
of the Display Content field. -->
<!-- This text will display if the
new_product flag is enabled and active. -->