# Importing mustache templates

**URL:** <https://discuss.elastic.co/t/importing-mustache-templates/79144>\
**Category:** Elasticsearch\
**Created:** [March 18, 2017, 6:19pm UTC](https://discuss.elastic.co/t/importing-mustache-templates/79144 "2017-03-18T18:19:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manvir\_Basra](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@Manvir\_Basra](https://discuss.elastic.co/u/Manvir_Basra)\
**Post date:** [March 18, 2017, 6:19pm UTC](https://discuss.elastic.co/t/importing-mustache-templates/79144/1 "2017-03-18T18:19:42Z")

</div>

Is it possible to import mustache templates in other templates?

For example: I have common code in  
header.mustache  
footer.mustache

Can I import them in search.mustache?

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [March 19, 2017, 10:30pm UTC](https://discuss.elastic.co/t/importing-mustache-templates/79144/2 "2017-03-19T22:30:32Z")

</div>

There is no support for mustache partials. Sorry.

---

<div class="post-metadata">

**Author:** ![Manvir\_Basra](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@Manvir\_Basra](https://discuss.elastic.co/u/Manvir_Basra)\
**Post date:** [March 24, 2017, 10:44pm UTC](https://discuss.elastic.co/t/importing-mustache-templates/79144/3 "2017-03-24T22:44:20Z")

</div>

Thanks Glen!

Is there any other way to solve such problem? Or I have to copy same snippet in all templates which is redundant work

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [March 30, 2017, 2:51pm UTC](https://discuss.elastic.co/t/importing-mustache-templates/79144/4 "2017-03-30T14:51:31Z")

</div>

I guess you could do some scripting to perform the merges for you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 27, 2017, 2:51pm UTC](https://discuss.elastic.co/t/importing-mustache-templates/79144/5 "2017-04-27T14:51:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
