# If Statement for Email or Page

**URL:** <https://community.hubspot.com/t/if-statement-for-email-or-page/8353>\
**Category:** CMS Development\
**Created:** [April 3, 2018, 12:49pm UTC](https://community.hubspot.com/t/if-statement-for-email-or-page/8353 "2018-04-03T12:49:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/john/32/43512_2.png) [@John](https://community.hubspot.com/u/John)\
**Post date:** [April 3, 2018, 12:49pm UTC](https://community.hubspot.com/t/if-statement-for-email-or-page/8353/1 "2018-04-03T12:49:14Z")

</div>

Is there a way to check if the user is using a module on an email or a landing/webpage?

For example:

```auto
{% if webpage %}
 xyz
{% elif email_template %}
 pdq
{% endif %}

```

---

<div class="post-metadata">

**Author:** ![benvanlooy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/benvanlooy/32/98997_2.png) [@benvanlooy](https://community.hubspot.com/u/benvanlooy)\
**Post date:** [April 4, 2018, 7:13am UTC](https://community.hubspot.com/t/if-statement-for-email-or-page/8353/2 "2018-04-04T07:13:03Z")

</div>

I’m not sure but I would assume that that type of info you could find the developers info.

Check out this post:

> **[Debugging methods and error types - HubSpot docs](https://developers.hubspot.com/docs/cms/start-building/introduction/developer-environment/troubleshooting)**
>
> Understanding how to debug and look into errors when developing websites on the HubSpot CMS.

It’s quite possible you’ll find a reference to which type of page you are on and then you can use the conditional statements to do what you like depending of the type of page.

---

<div class="post-metadata">

**Author:** ![John](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/john/32/43512_2.png) [@John](https://community.hubspot.com/u/John)\
**Post date:** [April 5, 2018, 12:50pm UTC](https://community.hubspot.com/t/if-statement-for-email-or-page/8353/3 "2018-04-05T12:50:53Z")

</div>

Thank you, I dug around and found a couple of things for anyone else who is interested.

HubSpot has data some data types. So far for drag and drop lp’s I have found

`{{ template_meta.template_type }}`

For Landing Pages created via drag & drop editor

```auto
{
 "template_meta": {
 "template_type": 4
 }
}

```

For blog pages via template editor

```auto
{
 "template_meta": {
 "template_type": 6
 }
}

```

I am curious to know what the other values represent.

---

<div class="post-metadata">

**Author:** ![BiG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/big/32/78471_2.png) [@BiG](https://community.hubspot.com/u/BiG)\
**Post date:** [August 26, 2019, 9:31am UTC](https://community.hubspot.com/t/if-statement-for-email-or-page/8353/4 "2019-08-26T09:31:28Z")

</div>

This feature is currently not implemented.

We added the query to have “HUBL if’s for emails” to the ideas here in the forum.

If you agree that this feature is needed, please support this idea which queries for if statements in HUBL for emails:  
[https://community.hubspot.com/t5/HubSpot-Ideas/if-statements-in-email-templates/idi-p/282907](https://community.hubspot.com/t5/HubSpot-Ideas/if-statements-in-email-templates/idi-p/282907)
