Dec 14, 20205:12 AM - edited Dec 14, 20205:12 AM
Top Contributor
if / or statement
SOLVE
Does anyone know if it's possible to create an if statement that covers multiple options for the page editior?
I have a created a tabbed module to be reused for our various homes to show floorplans and dimensions which are displayed within the relevant tab (first floor, second floor, third floor) .
Depending on the house type selected, 1, 2 or 3 tabs will show. I will then target that specific house name selection to pull in the correct data within each tab.
For example
{% if module.house_name =='Bodnant','Oakfield','Stratford' %}
3 tabs displayed to represent each floor of a 3 storey - selected house name data displayed within each tab
{% if module.house_name =='Bodnant' or module.house_name =='Oakfield' or module.house_name =='Stratford' %}
3 tabs displayed to represent each floor of a 3 storey - selected house name data displayed within each tab
{% elif module.house_name =='Wentworth' or module.house_name =='Thornbury' or module.house_name =='Windsor' %}
2 tabs displayed to represent each floor of a 2 storey - selected house name data displayed within each tab
{% else %}
1 tabs displayed to represent bungalow - selected house name data displayed within sole tab
{% endif %}
{% if module.house_name =='Bodnant' or module.house_name =='Oakfield' or module.house_name =='Stratford' %}
3 tabs displayed to represent each floor of a 3 storey - selected house name data displayed within each tab
{% elif module.house_name =='Wentworth' or module.house_name =='Thornbury' or module.house_name =='Windsor' %}
2 tabs displayed to represent each floor of a 2 storey - selected house name data displayed within each tab
{% else %}
1 tabs displayed to represent bungalow - selected house name data displayed within sole tab
{% endif %}