# Templates

## Creating a template

To create a new template navigate to the **Document templater** option in the side menu and click **Create template**. You will be asked if you would like to create a library or a document.

* Document - documents are stand alone advice documents that are unique to the type of advice/client receiving advice.
* Library - libraries can be linked to documents and are created by default when advice is created. These are designed to hold all general supporting information.

Once you make your selection a **New template** item will appear in the list. Click on this item and you are ready to edit.

<figure><img src="/files/W1RHCqxMtUDttfy9iGDI" alt=""><figcaption><p>Adding a new template</p></figcaption></figure>

## Editing a template

You can customise your document anyway you like. The templates you create will be used to produce documents for your groups in MOAS again and again to ensure consistency. Template titles can be edited by clicking on the title in the top left corner.&#x20;

### File options

The file button underneath the document name will open a list of options. These include the following:

* **Type** - toggle between document and library
* **Page** **Orientation** - toggle document orientation between portrait and landscape&#x20;
* **Duplicate** - This will make an exact copy of the template and will be available in your list of templates.
* **Publish** - Every template has a "publish" option. By default this will be turned off. Publish makes the template available for document creation. When published, the publish date will appear next to the publish button.
* **Theme** - select which theme you would like applied to the template
* **Delete** - delete the template. This will permanently delete the template, you will not be able to recover it.
* **Library** - link a library to the template

<figure><img src="/files/j9wjCJhSgRsBbDFbBPCS" alt=""><figcaption><p>File menu options.</p></figcaption></figure>

### Page options

Here you can toggle page number and footers.

### Insert options

You can add multiple types of content per page in the document. See [Page Content](/documents/page-content.md) for more detail.

### Sections

At the bottom of the side menu you will see the document sections and pages listed out. Sections can hold any number of pages and have the following options available:&#x20;

* **Add -** add a new section by clicking the plus button in the top right corner. This will add a page by default. Sections must have at least one page.
* **Edit** - to edit the section name click on the section title
* **Delete** - this deletes the entire section **including** all pages within and section
* **Lock** - locking the section will make the section and all pages within "locked", this means the section and the pages within cannot be deleted, the section title and the page titles cannot be edited in documents created from the template.&#x20;
* **Duplicate** - duplicate the section and all the pages within.
* **Add page** - add a page within a section by clicking the plus button across from the "pages" header within the section.

#### Navigating

Clicking on a section title will scroll to the first page in the section. Clicking on a page will scroll to the page.

#### Re-ordering

Sections and pages within sections can be re-ordered. Drag the re order icon on the left of the section/page name and drag to its new position.


---

# Agent Instructions: 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:

```
GET https://docs.moasapp.com/documents/templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
