# Load/Import HTML file into Template

**URL:** <https://community.hubspot.com/t/load-import-html-file-into-template/14013>\
**Category:** CMS Development\
**Created:** [April 16, 2019, 3:09pm UTC](https://community.hubspot.com/t/load-import-html-file-into-template/14013 "2019-04-16T15:09:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [April 16, 2019, 3:09pm UTC](https://community.hubspot.com/t/load-import-html-file-into-template/14013/1 "2019-04-16T15:09:24Z")

</div>

Hi guys.

I have a question regarding Templates and HubL.

If I’m **not** using a drag and drop template, is there a way to load an HTML file into the template?

Imagine that I need to load a piece of code or another depending on a parameter in the URL. For example:

if url contains ‘/es/’ then

load\_html\_1

else

load\_html\_2

endif

Is it possible? If yes, how can I do it with HubL? I cannot find anything in the documentation.

And no, I don’t want to use custom modules. I’m talking about calling a template from another template.

Thank you!

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [April 17, 2019, 11:45am UTC](https://community.hubspot.com/t/load-import-html-file-into-template/14013/2 "2019-04-17T11:45:35Z")

</div>

Solved, using partial templates and include them. Easy solution but the documentation is so bad structured that is hard to find what we need. If someone is interested, to include a partial template just do the following:

{% include “Your/URL/to/the\_template.html” %}

---

<div class="post-metadata">

**Author:** ![Kmakri](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kmakri/32/69256_2.png) [@Kmakri](https://community.hubspot.com/u/Kmakri)\
**Post date:** [October 24, 2019, 8:23am UTC](https://community.hubspot.com/t/load-import-html-file-into-template/14013/3 "2019-10-24T08:23:38Z")

</div>

Hi, can you provide the steps for uploading an html code into an existing template please?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [February 6, 2020, 11:02am UTC](https://community.hubspot.com/t/load-import-html-file-into-template/14013/4 "2020-02-06T11:02:19Z")

</div>

Sorry for the late reply, didn’t see your question.

I already provided the solution, just create a partial template with your code and add it to the main template using the following:

{% include “Your/URL/to/the\_template.html” %}
