> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/user/template-builder/template-editor/how-to-create-a-structured-template.md).

# ​How to Create a Structured Template

This document explains how to add, duplicate, and delete a structured document in a template.

### When to use a structured document

A structured document contains editable text, static content, and dynamic fields.\
Use it when you need to build the document directly in the editor and control both content and field placement.

Choose the document type that matches your goal:

* **Structured** — create editable content with dynamic fields
* **PDF** — keep a fixed layout from an uploaded PDF file
* **External document** — attach a file to the template without rebuilding it in the editor

{% hint style="info" %}
Use a structured document when you need full control over text, formatting, and dynamic fields in the editor.
{% endhint %}

### Add a structured document

{% columns %}
{% column width="58.333333333333336%" %}

1. Open the left documents panel.
   * If the panel is collapsed, click the **Documents** ![](https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FyZVvNxBggzRQhkqSqf5O%2Fdocuments%20icon.png?alt=media\&token=9b9b5179-eb66-4fe1-8166-7c165168632a) icon to expand it.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F1tf9RatveODqLFQAdPgp%2Fimage.png?alt=media&amp;token=74ffb638-08ac-4563-822f-718b09e8a4a9" alt="" data-size="line"> button.
3. Select **Structured**.
4. The new structured document appears in the document list and opens in the editor.
5. Add content and fields.
   {% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FO9pkanPKgPBmKMvhYyMS%2Fimage.png?alt=media&amp;token=bbe005ac-5ceb-4522-822a-bd63ac6a1bcf" alt="" width="127"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Duplicate a structured document

{% columns %}
{% column %}

1. In the document header, open the context menu.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FBe67XUlnpkGuiJ0SLcMr%2Fimage.png?alt=media&amp;token=d5e4fe7a-82ec-4e12-a1e6-e8569fe228e2" alt="" data-size="line"> icon.

DocStudio creates a copy of the current structured document with its content and fields.
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FJJKBCItFA0lvoY5Tbeum%2Fimage.png?alt=media&amp;token=5c9164ca-0138-4d58-a5ae-c2235ce29cdb" alt="" width="107"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Delete a structured document

{% columns %}
{% column %}

1. In the document header, open the context menu.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FmsWaax0pY7GZy1D2H6i8%2Fimage.png?alt=media&amp;token=e069236a-1e0e-4146-bd6c-bf7704eec1af" alt="" data-size="line"> icon.

This action removes the structured document from the current template.
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FP0IMcYsCTHy2KxFx94Lt%2Fimage.png?alt=media&amp;token=950cc51a-43fe-44a7-9ac2-1d4e862c3414" alt="" width="107"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="warning" %}
Delete a structured document only if you no longer need its content and fields in the template.
{% endhint %}

### Related topics

* [Template Editor Interface Overview](/user/template-builder/template-editor/template-editor-interface-overview.md)
* [How to Add or Edit Images in a Template](/user/template-builder/template-editor/how-to-add-or-edit-images-in-a-template.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.docstudio.com/user/template-builder/template-editor/how-to-create-a-structured-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
