# Conditional include

**URL:** <https://community.hubspot.com/t/conditional-include/31737>\
**Category:** CMS Development\
**Created:** [February 12, 2021, 6:37pm UTC](https://community.hubspot.com/t/conditional-include/31737 "2021-02-12T18:37:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cory-blackbird](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cory-blackbird/32/65713_2.png) [@cory-blackbird](https://community.hubspot.com/u/cory-blackbird)\
**Post date:** [February 12, 2021, 6:37pm UTC](https://community.hubspot.com/t/conditional-include/31737/1 "2021-02-12T18:37:39Z")

</div>

Since there doesn’t seem to be any comprehensive Hubl syntax documentation, I’ve been referencing the Jinja 2.10 docs. Jinja includes the ability to include an array of templates, where the first template that exists gets pulled in (see [Template Designer Documentation — Jinja Documentation (3.1.x)](https://jinja.palletsprojects.com/en/2.10.x/templates/#include%F0%9F%98%9E)

`{% include ['../../custom/header.html', 'header.html'] ignore missing %}`

I’m attempting to develop a system for a custom HubSpot theme I’m building where a special html file can be added in a particular place to override a section of a template, such as the header, and the above would be perfect for this. However, this syntax does not seem to be compatible with Hubl. I get this output in the HTML:

`<!-- Missing Template at Path: '['../../custom/header.html',' -->`

It appears that it’s including the ‘[’ in the include statement.

If this syntax is not supported, is there a way to check for the existence of a file before including it?

---

<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:** [February 12, 2021, 7:35pm UTC](https://community.hubspot.com/t/conditional-include/31737/2 "2021-02-12T19:35:54Z")

</div>

Hey @cory-blackbird

I think the closest thing you can get to that would be the [block technique](https://developers.hubspot.com/docs/cms/building-blocks/templates/html-hubl-templates) and the [super](https://developers.hubspot.com/docs/cms/hubl/functions#super) function.
