More useful conditions

Hi guys
I like to suggest useful conditions that i faced while designing:

1- Has child term: Show element if we don’t have child term (product
categories)

2- Has parent term: show element if we have parent categories

3- Is archive: I’m thinking
if “Is shop” condition is working on archive for categories or just the shop page?

4- Is empty: show/hide element if we don’t have anything to render in a div element

5- has attribute: Hide an element when there is no product with specific attribute

6- number of indexed feature: Show an element if the number of indexed attribute/categories/custom field, is not zero
Use case: assume that we are in archive shop and we want to hide an element if we don’t have any products with specific attribute (number of indexed attribute in that archive is zero).

7- Set conditional logic base on css classes
Link: Conditional Rendering in Bricks Based on CSS Class

8- If an element get new classes like class A and B , then hide another element with class C
Example: In some cases like dropdown element, when we click on it, this element get new classes (open & active) then we want to hide or show another element with class C in the content of the dropdown

2 Likes
  1. Condition for builder elements based on Pro Form values.