Agility CMS documentationAgility CMS documentation
OverviewEditorsDevelopersOwners & AdminsTraining GuideApps
Sign inLet's Chat
Developers
Content-first ApproachContent ModelsComponent Models FieldsLinked Content Field TypesGetting Started with Linked ContentSitemapsPage ModelsSetting Up PreviewHandling Agility URLsDeployment & Code RepositoriesTagging Content in AgilityManaging SEO for DevelopersMastering Nested Linked Content in Agility CMS: Enhance Hierarchical Data ManagementAdvanced Field Validation with Regular ExpressionsDynamic Content Control: Implementing Hide/When Formulas in Your Headless CMS Content ModelGrouping Components into Tabs, Accordions, and SectionsConditional & Cross-Field Validation

Content Architecture

Dynamic Content Control: Implementing Hide/When Formulas in Your Headless CMS Content Model

Implementing hide/when formulas within the content model interface enables the process of defining conditional visibility logic. Users can leverage familiar syntax to create rules based of the values of other fields in the content model.

What is Dynamic Content Control and Why is it Important?

Unlocking the full potential of a headless CMS requires more than just data storage; it demands dynamic control over content presentation. In this article, we explore the transformative power of implementing hide/when formulas for fields in your content model, revolutionizing how users interact with and consume content - right inside Agility.

Traditional content models often offer static display options, limiting users to predefined visibility settings. However, by integrating hide/when formulas, users gain flexibility to conditionally hide or display fields. This nuanced control empowers content creators to tailor the viewing experience, ensuring that users only see relevant information when and where it matters most.

How Does it Work?

Our hide/when formulas are based on a simple query language of operators and operands, which evaluate the values of other fields in your content model.

For example, this is a hide/when formula dictating that when the "description" is empty, the field that the formula is applied to will be hidden:

description[eq]""

We support 4 different operators:

  • [eq] Equals
  • [ne] Not equals
  • [lt] Less than
  • [gt] Greater than

We also support parenthesis, so you can get complex with your hide/when formulas, for example:

((age[gt]24&&name[eq]"Kevin")||name[eq]"Brendan")||admin[eq]true

To use a hide/when formula, navigate to your content model, click on the "Advanced" tab, and scroll down to these text inputs:

Hide/when field

Enter a hide/when formula and it will be applied to all content 

← Previous
Advanced Field Validation with Regular Expressions
Next →
Grouping Components into Tabs, Accordions, and Sections
On this page
What is Dynamic Content Control and Why is it Important?How Does it Work?
Agility CMS documentationAgility CMS documentation

Documentation for the CMS built for editors, developers, and AI agents.

Docs
  • Overview
  • Editors
  • Developers
  • Owners & Admins
  • Training Guide
  • Changelog
Resources
  • Get Support
  • MCP Server
  • System Status
  • llms.txt
Agility
  • agilitycms.com
  • Start Free Trial
  • Sign in
  • Blog
© 2026 Agility Inc. All rights reserved.
Privacy PolicyTerms of Service