> For the complete documentation index, see [llms.txt](https://olab4.gitbook.io/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://olab4.gitbook.io/help/basic-topics/templates.md).

# Templates

## **Overview**

![](https://lh6.googleusercontent.com/EftZ3WreRgXv3zZGCjeX4pAqh2c4c1VzlY6pmcxq5XNcOqXAfhWJrojoUtgFjnlGtdSF47fYMIXdYOzwaVt7TZ5NshaIXIL7T4eHqE5dusGYJpkRzVbF9mvLo-GXZLphooaUdJDP)

You can think of templates as being like Lego bricks: modular pieces to build upon.&#x20;

Templates are like Maps or fragments of Maps. They have the same basic structure as a set of Nodes, Links and Objects. We have made them much more flexible than the limited set of templates that could be inserted into an OLab3 map.&#x20;

In principle, you could make any Map into a Template, using the ‘Save as Template’ icon in the Map Designer.&#x20;

![](https://lh3.googleusercontent.com/EWokooyhfptm9PEaBCWQdNUuNi8sLG_wsayPLDwsXvNyoVXB9jUoogE3BJnJBHEoMSpZVmtLSD2F8wPRWK1FbMb71-8d6p7Tm1-DMHCunZ9pppTLLzo9xBK9TwfiaNa-A_ZgGcm2)

But there are downsides to making really complex Templates. It is generally better to create a complex Map by inserting smaller templates into it, piece by piece.&#x20;

![](https://lh6.googleusercontent.com/0mZugw7SdUOv70Zng4sj-D8ZF4YTUTp8_NFKN5a6i1H7RuM3ED4BFHDlMrhfVF-RIvdbjjrmZVUE6O5_Ev9cafsL3Hk_TCzAo3e1kRSM_6co-fHh0OT_yn-d4Adu9SVgBJILPqhR)

You can start your Map design from a Template, such as the **Starter Template**.&#x20;

![](https://lh3.googleusercontent.com/dpgtif4fJu_u3GYhAxH-b_ZfxKvnUJcXawAK1EucHZCODemrkxD_Dyd_WxXkzKlcICXSAFrHykGaWKnE1ALje282q6Y4uxiShwUCW9s7xf9Tsl4fO3RkB4B1Iqad9Qzf0UVJONme)

Remember to **give your new Map a name**. Otherwise it will be confusing to see it called 'Starter Template' as well.&#x20;

Then you can insert more small Templates into your Map as you need them. You may need to re-centre your Designer viewport so that the new Template is not dropped on top of a bunch of existing Nodes -- this can be quite messy.&#x20;

You can also create new Templates by saving an existing map or fragment as a Template, using the ‘Save as Template’ icon in the Map Designer.&#x20;

![](https://lh3.googleusercontent.com/EWokooyhfptm9PEaBCWQdNUuNi8sLG_wsayPLDwsXvNyoVXB9jUoogE3BJnJBHEoMSpZVmtLSD2F8wPRWK1FbMb71-8d6p7Tm1-DMHCunZ9pppTLLzo9xBK9TwfiaNa-A_ZgGcm2)

{% hint style="info" %}
Save as Template: this icon does not work at the moment. But you can save your map and then convert it to a Template. Go to My Map | Map Details and then look under the Advanced tab. You can toggle the map to be a Template there.&#x20;
{% endhint %}

## **Templates and Scope**

Although they are not quite the same as other Objects, you can still apply a scope to a Template. Generally these will be server-level and course-level scope for most authors. It does not make much sense to create Templates with map-level scope. Only core devs will be able to create Templates with Global scope.&#x20;

## **What is the difference between a Map and a Template?**

1. Templates are usually simpler and not intended to be played by themselves.&#x20;
2. Maps must have at least one Root Node so that they can be played.&#x20;
3. Templates often will not have a Root Node so that they can be more cleanly inserted into an existing map.&#x20;
4. If there are Questions embedded in a Template, they must be server-level in scope.&#x20;
5. We do not recommend embedding Counters in a Template. While it can be done, it often causes confusion.&#x20;
6. There may be a Theme attached to a Template


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://olab4.gitbook.io/help/basic-topics/templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
