# LinkEHR add archetype to template

**URL:** https://discourse.openehr.org/t/linkehr-add-archetype-to-template/967
**Category:** LinkEHR
**Created:** [7 September 2020 16:22 UTC](https://discourse.openehr.org/t/linkehr-add-archetype-to-template/967 "2020-09-07T16:22:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![savas-mmt](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@savas-mmt](https://discourse.openehr.org/u/savas-mmt)
#### Post date: [7 September 2020 16:22 UTC](https://discourse.openehr.org/t/linkehr-add-archetype-to-template/967/1 "2020-09-07T16:22:58Z")

</div>

I’m trying to create a template in LinkEHR using an archetype I have defined and some other archetypes taken from the openEHR repository, however I am struggling to work out how to include these in my template. I have tried “Export ADL for openEHR editor/ Template Designer”, using a archetype slot and just dragging and dropping but I am having no luck.

Is there something obvious I am missing?

---

<div class="post-metadata">

### Author: ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)
#### Post date: [7 September 2020 16:47 UTC](https://discourse.openehr.org/t/linkehr-add-archetype-to-template/967/2 "2020-09-07T16:47:42Z")

</div>

Hello Savas,

To correctly define templates, linkEHR must be in “template mode”. This can be achieved by importing an OPT, creating a new template from the menu, or by selecting ‘using as template’ option from the local repository panel. Were you using any of these? In any case you should be able to export it to OPT or even OET. The option you mentioned would export to an ADL that can be used by the Template Designer

---

<div class="post-metadata">

### Author: ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)
#### Post date: [8 September 2020 08:38 UTC](https://discourse.openehr.org/t/linkehr-add-archetype-to-template/967/5 "2020-09-08T08:38:31Z")

</div>

Oh, good catch. I’ll take a look at it. See if you can send us the error log from the Linux version, it probably can tell us what’s going on.

---

<div class="post-metadata">

### Author: ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)
#### Post date: [8 September 2020 09:04 UTC](https://discourse.openehr.org/t/linkehr-add-archetype-to-template/967/7 "2020-09-08T09:04:02Z")

</div>

Yes, definetly is caused by that. Shouldn’t be hard to fix in any case
