# Een op maat gemaakte ruwe template toevoegen

**URL:** <https://meta.discourse.org/t/adding-a-bespoke-raw-template/177993>\
**Category:** Development\
**Created:** [1 februari 2021 om 17:40 UTC](https://meta.discourse.org/t/adding-a-bespoke-raw-template/177993 "2021-02-01T17:40:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [1 februari 2021 om 17:40 UTC](https://meta.discourse.org/t/adding-a-bespoke-raw-template/177993/1 "2021-02-01T17:40:32Z")

</div>

Hey, I’m trying to add my own Raw template … not simply override an existing one.

Reason: trying to get rid of those nasty ember tags you get when using nested components.

… initially I assumed it would be as easy as just adding one to the `templates` or `templates/list` directory, so I went ahead and did that, only for it to silently fail (to find my template).

Perhaps I can confirm this is not supported?

Then I found this:

[https://github.com/discourse/discourse/commit/612284cef31cb9f068e0d36d01306d355a065ced](https://github.com/discourse/discourse/commit/612284cef31cb9f068e0d36d01306d355a065ced)

and this:

> <https://github.com/discourse/discourse/blob/83347ac218f708e172944f087c4781acad41efaf/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js>

So I tried this:

```plaintext
import { addRawTemplate } from "discourse-common/lib/raw-templates";
import { compile } from "handlebars";

<---some init stuff -->

addRawTemplate('search-result-entry', compile(`<span class='result-lala'>hello</span>`));

```

Only to get this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/7/e784a84806b623f1618e9aab7e9e1bba7b7738c5.png)

`TypeError: Handlebars.compile is undefined`

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/e/3e153cd47b694fb8d183e8b333e06163439f1a1d.png)

Thanks!

Apologies if I’m doing anything wrong here …

(this is going to be super useful btw, so thank you for implementing it!)

---

_[View the full topic](https://meta.discourse.org/t/adding-a-bespoke-raw-template/177993)._
