# if / or statement

**URL:** <https://community.hubspot.com/t/if-or-statement/29121>\
**Category:** Blog, Website & Page Publishing\
**Tags:** workaround, developer, website-pages, marketing\
**Created:** [December 14, 2020, 10:12am UTC](https://community.hubspot.com/t/if-or-statement/29121 "2020-12-14T10:12:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben-duchy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben-duchy/32/84083_2.png) [@ben-duchy](https://community.hubspot.com/u/ben-duchy)\
**Post date:** [December 14, 2020, 10:12am UTC](https://community.hubspot.com/t/if-or-statement/29121/1 "2020-12-14T10:12:13Z")

</div>

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

**{% elif module.house\_name ==‘Wentworth’,‘Thornbury’,‘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 %}**

Unfortunately this doesnt work. Is there a workaround? Ideally I dont want to have multiple if statements to cover every house name.

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [December 14, 2020, 7:34pm UTC](https://community.hubspot.com/t/if-or-statement/29121/2 "2020-12-14T19:34:00Z")

</div>

Hey @ben-duchy

You’ll want to use the logical [OR operator](https://developers.hubspot.com/docs/cms/hubl/operators-and-expression-tests#logical).

```lia-code-sample
{% 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 %}

```

---

<div class="post-metadata">

**Author:** ![ben-duchy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben-duchy/32/84083_2.png) [@ben-duchy](https://community.hubspot.com/u/ben-duchy)\
**Post date:** [December 16, 2020, 9:44am UTC](https://community.hubspot.com/t/if-or-statement/29121/3 "2020-12-16T09:44:08Z")

</div>

That’s Perfect @Kevin-C just what I needed. Thanks 😀
