This feature allows you to dynamically present relevant information to enhance user engagement, relevance, and satisfaction. Here are the tags you use to set up conditional content.
How to show and hide conditional content on your site
Current_store
Display content based on the current store.
{% if current_store.code == 'dog-store' %}
The {{ current_store.name }} is the best for dogs
{% elsif current_store.code == 'cat-store' %}
The {{ current_store.name }} is the best for cats
{% endif %}
Current_customer
Display or hide content based on the customer who is signed in.
{% if current_customer %}
Hi {{ current_customer.firstname }}!
Your email address is {{ current_customer.email }}
Your account name is {{ current_customer.account.name }}
{% endif %}
Current_account
Display or hide content for a particular account.
{% if current_account %}
Hi {{ current_account.firstname }}!
Your email address is {{ current_account.email }}
Your account name is {{ current_account.account.name }}
{% endif %}
Current_membership
Display content based on the membership level of person signed in.
{% if current_membership %}
{% if current_membership.name == 'VIP' %}
Welcome back!
{% endif %}