How to Set Display Conditions for Elements in the Collection Widget and on Dynamic Pages
You can set display/visibility conditions for any elements and widgets inside an Item of the Collection widget on any page. On a dynamic page, you can apply these conditions even without adding the Collection widget itself.
How It Works
-
You can control the visibility of an element based on data from any field in the collection.
-
Conditions can be applied to any element, even if they are not directly linked to a collection field.
-
Once a condition is added, it will appear in the list, and the element will be hidden on the canvas, in preview mode and on the published website if it does not meet the specified rule.
How to Set Up Conditional Display
1. Select the necessary element
Choose the element you want to apply a display condition to.
This can be any element inside a Collection Item or any element on a dynamic page—text, image, button, etc.
2. Configure the display condition
- Go to the Settings tab on the right panel. Open Conditional visibility and click “+” to add a condition.
- Select the collection field whose data will determine whether the element is shown or hidden. Set a rule/a condition for this field — for example, “Equals”, “Doesn’t equal”, “Is set”, “Isn’t set”.
Example: show a Promo Badge only if the “Discount” field is filled.
3. Click Add condition button.
You can set any number of conditions for a single element.
3. Check the result
After it’s added, the condition will appear in the list.
If the element doesn’t meet the rule/the condition, it will be hidden.
You can set any number of conditions for a single element.
Managing conditions
- To edit/change condition, click the gear icon to the left of its name.
- To delete a condition, click “–“.
Automatic hiding of empty elements
If an element is linked to a collection field, an automatic condition is applied: the element will be displayed only if the field is filled. If a collection item’s field contains no data, the element will be hidden on the canvas, in preview mode, and on the published page.
This prevents empty blocks or elements without data from appearing on your site — for example, a frame around an image that wasn’t uploaded or a text block with no content.
Important Notes
- If you set two conflicting conditions (for example, “Is filled” and “Is empty”), the first condition will be reset.
- If an element is placed on a dynamic page inside a Collection widget, and the element and the widget are connected to different collections, the system will use the collection linked to the widget, not the page.
Examples of Use
- Hide elements linked to empty fields — for example, when an image hasn’t been uploaded.
- Show promotional prices or badges only for items with discounts.
- Display different messages for different countries during delivery — for instance, show “International shipping” for all countries except Russia.