Example

Examples of hide conditions can be found throughout AEM and the core components in particular. For example, consider the list core component as implemented in the WKND tutorial.

Using the template editor, the template author can define in the design dialog which options of the list component that are available to the page author. Such options as whether to allow the list to be a static list, a list of child pages, a list of tagged pages, and so on can be enabled or disabled.

If a template author chooses to disable the child pages option, a design property is set and a hide condition is evaluated against it, which causes the option to not render for the page author.

  1. By default, the page author can use the list core component to build a list using child pages by choosing the option Child pages.

    List Component settings

  2. In the design dialog of the list core component, the template author can choose the option Disable Children to prevent the option to generate a list based on child pages from being shown to the page author.

    List Component design dialog

  3. A policy node is created under /conf/wknd/settings/wcm/policies/wknd/components/list with a property disableChildren set to true.

    Node structure of hide condition

  4. The hide condition is defined as the value of a granite:hide property on the dialog property node /libs/core/wcm/components/list/v2/list/cq:dialog/content/items/tabs/items/listSettings/items/columns/items/column/items/listFrom/items/children

    Evaluation of hide condition

  5. The value of disableChildren is pulled from the design configuration and the expression ${cqDesign.disableChildren} evaluates to false, meaning the option will not be rendered as part of the component.

  6. The option Child pages is no longer rendered for the page author when using the list component.

    List Component with child option disabled

Announcements

Get hands-on with agentic AI.

Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.

Find an event

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.

Ask AI