---
title: Templates – Reusable Starting Points for Nodinite Articles
description: Create Articles from reusable Templates in Nodinite, pair a Template with a Document Profile to supply starter text per section, or turn an existing Article into a new Template with Copy as Template. Understand macros in template-based Articles and Source Template tracking.
---

# :fa-clone: Templates

:new7.11:

Standardize how a category of [Article][Articles] begins. A **Template** copies its content, content type, tags, and [Custom Metadata][] into every new Article created from it — so a runbook, a design document, or an onboarding guide always starts from the same shape instead of a blank page. A Template can also use a [Document Profile][Document Profiles], and then supplies the starter text for each of the profile's sections.

* ✅ Start new Articles from a consistent, pre-approved shape  
* ✅ Pair a Template with a Document Profile: the profile sets the structure, the Template fills in the starter text  
* ✅ Keep reusable macro placeholders in the Template body  
* ✅ Resolve Resource and C4 node macros from context when available  
* ✅ Trace every Article back to the Template it came from  

![All Articles, the Add Article dropdown, From Template, the Choose Template dialog filtered on Contoso with Use on Contoso Runbook Template, the editor with the banner Initialized from template Contoso Runbook Template and a new title, one line added, Save, View, and the new Article open for reading, animated walkthrough (7.12)][Hero]  
*Animated walkthrough: **Add Article** > **From Template…**, pick the Template with **Use**, give the Article its title, add a line, **Save**, and **View**. `{{ Resource.Name }}` from the Template reads empty here: a `Resource.` variable is filled in only when the Article is created from a [Resource][Resources]. For a name that follows the item the Article is read for, use the document macro `{{ entity.name }}`.*  

## :fa-sitemap: Understanding Templates

A **Template** is a starting point for new Articles — its content, content type, tags, and Custom Metadata are copied into every Article created from it. Unlike a [Snippet][Snippets], a Template's content isn't included by reference: it's copied once, at creation, and the new Article is then free to diverge from it.

<div class="mermaid">
graph TD
  Template[fa:fa-clone Template: Incident Runbook]
  ArticleA[fa:fa-newspaper Article: DB Outage Runbook]
  ArticleB[fa:fa-newspaper Article: API Outage Runbook]
  Template -- Create From Template --> ArticleA
  Template -- Create From Template --> ArticleB
  ArticleA -- Based On Template --> Template
  ArticleB -- Based On Template --> Template
</div>

*Two Articles created from the same Template. Each copy is independent after creation, but both remember their Source Template.*

| Concept | Behavior |
|---|---|
| Copied at creation | Content, content type, tags, and Custom Metadata — plus the Document Profile and the text of each Content Part, when the Template uses a profile |
| Independent afterward | Editing the Template does not change Articles already created from it |
| Source Template | Recorded on the new Article; visible in the reader and relationship views |

## :fa-list-check: Profile-Based Templates

:new7.11:

A Template can use a [Document Profile][Document Profiles], just like an Article. The three document types then share the work:

<div class="mermaid">
graph LR
  Profile[fa:fa-list-check Document Profile - structure]
  Template[fa:fa-clone Template - starter text per section]
  Article[fa:fa-newspaper Article - the instance]
  Profile -- Structures --> Template
  Profile -- Structures --> Article
  Template -- Create From Template --> Article
  style Profile fill:#2678BD
  style Template fill:#E47528
  style Article fill:#93d16d
</div>

*The Document Profile (blue) owns the structure, the Template (orange) owns the starter text for each Content Part, and the Article (green) is the instance a user writes.*

| | Owns |
|---|---|
| Document Profile | The structure: Snippet Parts and Content Part slots |
| Template | Starter text for each Content Part, plus tags and Custom Metadata |
| Article | Its own text, written from that starting point |

* **Editing the Template** — choose a Document Profile in the Template editor, and the Template is shown in the same [composite workspace][Writing a Profile-Based Article] as an Article: Snippet Parts locked, and one editor per Content Part for its starter text. The Template's reader shows the composed document.
* **Creating an Article from it** — the new Article starts profile-based: the Template's Document Profile is preselected, and the Main Body and every other Content Part start with the Template's text. Template variables found in any Content Part are listed to fill in, as for the Main Body.
* **A Template without a profile** — works as before: one body, copied into the new Article.

## :fa-book: Seeded Example Template

On a new installation, :Nodinite: seeds the **Standard Technical Base Template**, which uses the seeded **Standard Technical Article** Document Profile. It supplies starter text for the profile's two Content Parts — *Describe purpose and scope.* for the **Overview** Main Body, and *Describe implementation details and operational context.* for **Details** — while the profile supplies the header, Next Step, Related Topics, footer, and copyright Snippet Parts.

>[!NOTE]
>An upgraded installation keeps the seeded Template it already has: a single body with its own headings and Snippet include tokens, and no Document Profile.

:new7.12: The seeded Template is marked **Shipped by Nodinite**: it can't be edited or deleted, and every :Nodinite: upgrade updates it in place. Clone it to make your own version. See [Shipped by Nodinite][].

## :fa-code-compare: Macros in Template-Based Articles

Templates can contain the same [macros][Macros Reference] as regular Articles. Macro placeholders are kept in the content and resolved when the Article is displayed.

| Macro group | Example | Resolution behavior |
|---|---|---|
| Date and time | `{{ today }}`, `{{ now.utc }}` | Resolved at display time |
| Article | `{{ article.title }}`, `{{ article.url }}` | Resolved from the current Article |
| Environment | `{{ environmentname }}` | Resolved from the active environment |
| Resource / C4 node | `{{ resource.name }}`, `{{ node.name }}` | Resolved when the Article is opened in the matching context |

A Template can also hold content tokens, including `{ndx}` inline icons placed with **Insert Icon**, the same icons as [Component Types][] (requires a [Mapify license][License Options and Feature Matrix]). Like the rest of the content, they're copied into each new Article; see [Inline Icons with {ndx}][Inline Icons].

The editor's **Template Guidance** card starts *Templates are starting points and are not bound to Resources, Categories, Applications, Repository items, or C4 nodes.* It then explains that a Template may use a Document Profile, whose sections become the starter text of every new Article, and that a Template without a profile can compose with reusable Snippets. Last, it separates template variables such as `{{ CurrentYear }}` and `{{ CurrentDate }}`, filled in once when the Article is created, from document macros such as `{{ article.title }}` and `{{ entity.name }}`, resolved every time the Article is rendered for the item it is read for. **Macro help** lists them all; see the [Macros Reference][].

Which template variables are filled in depends on where you create the Article:

* `{{ CurrentYear }}` and `{{ CurrentDate }}` are always filled in once, when the Article is created from the Template.
* `{{ Resource.Name }}` and every other `Resource.`, `Category.` and `Application.` variable is filled in only when the Article is created from that [Resource][Resources], Category or Application. Created from the Articles list (**Add Article** › **From Template…**), there is no Resource, so the variable stays in the text as written, and the reader shows it as an unknown macro: empty.
* For a name that should follow the item the Article is read for, use a document macro such as `{{ entity.name }}` instead of `{{ Resource.Name }}`.

![Template Guidance card: Templates aren't bound to Resources, Categories, Applications, Repository items, or C4 nodes; a Template may use a Document Profile; the std-header, std-footer, std-next-step, and std-related-topics Snippet tokens; template variables such as CurrentYear and CurrentDate, filled in once; and document macros such as article.title and entity.name, resolved every time the Article is rendered (7.12)][3]  
*The Template Guidance card in the editor: template variables are filled in once, document macros every time the Article is rendered.*  

## :fa-square-plus: Create an Article From a Template

1. Start creating a new Article
2. Choose **Create From Template**
3. Pick a Template from the list
4. The Article's content, content type, tags, and Custom Metadata are copied in; for a [profile-based Template](#fa-list-check-profile-based-templates), the Document Profile is preselected and each Content Part starts with the Template's text
5. A banner in the editor reads *Initialized from template (name)*, with a link to the Template. Give the Article its title and click **Save**

You can also start from a Template in one click: the **Add Article** dropdown's **From Template…**, the **Create Article From Template** row action on the Templates overview, and the **Create Article from this Template** button on a Template's editor and reader pages. See [Ways to Create an Article][] for every entry point and the `templateId` deep link. When a link carries both `templateId` and `profileId`, a profile-based Template's own Document Profile wins.

![Create From Template picker shown when creating a new Article (7.12)][1]  
*Example of choosing a Template while creating a new Article.*  

## :fa-i-cursor: Macro Resolution Context

Some macros need context from where the Article is opened:

* Opening the Article from a [Resource][Resources] provides `resource.*` values
* Opening the Article from a [C4 diagram node][C4 Article Links] provides `node.*` values

If that context is missing, for example when the Article is read from the Articles list, those macros render empty; they resolve when the Article is viewed in a matching context. The editor and its preview always show them as typed. Macros are not template variables: a variable the editor can't resolve asks for its value with **Apply Variables** when you create the Article (see [Template Variables and Macros][]).

## :fa-link: Source Template Tracking

An Article created from a Template remembers it. The reader and relationship views show **Based On Template**, linking back to the Template it came from — even after the Article's own content has since changed completely.

## :fa-copy: Copy an Article as a Template

:new7.11:

Your best Article is often the best starting point for the next one. **Copy as Template** turns an existing Article into a new Template, and leaves the Article itself untouched.

1. Choose **Copy as Template**, either from the Article's row **Action** menu on the Articles overview, or from the **Clone** dropdown in the Article editor's header
2. The Duplicate dialog suggests the title *<title> (Template)*; change it if you like
3. Confirm — the new Template is created, and it opens in the browser

![Clone split button in the Article editor header, with Copy as Template in the dropdown (7.12)][4]  
*Example of Copy as Template in the Article editor's Clone dropdown.*  

| What happens | Behavior |
|---|---|
| Copied | Title (as entered in the dialog), content, content type, tags, [Custom Metadata][], and the [Document Profile][Document Profiles] when the [Article][Articles] uses one |
| Not copied | [Resource][Resources], [Application][Applications], and [Category][Categories] links, because a Template has none of them |
| [Profile-based Article][Writing a Profile-Based Article] | The Template keeps the Article's [Document Profile][Document Profiles]: the Main Body becomes the Template's body, and every other Content Part keeps its text as starter text. The [Snippet][Snippets] Parts still come from the profile, so they aren't copied into the Template |
| Plain [Article][Articles] | The Template gets the Article's single body, as is |
| Relationship | The Template's **Clone Source** points at the original [Article][Articles], so the [relationship views][Reading Articles] show where it came from. It has no Source Template |
| Original [Article][Articles] | Not modified. There's no in-place conversion: a document's kind never changes after it's created |
| Permission | [Create][Permission Set for the Repository Model - Create] on [Articles][Permission Set for the Repository Model - Articles] (`Repository_Article_Create`), the same as Add and Clone |

Copy as Template is available for Articles only. To go the other way, create an Article from the Template as described above.

### :fa-code: Web API

Copy as Template uses the existing duplicate endpoint of the :Nodinite: [Web API][] with a new optional query parameter, `targetDocumentType`:

```http
POST api/Articles/{id}/Duplicate?targetDocumentType=Template
Content-Type: application/json

{ "Name": "Incident Runbook (Template)" }
```

| `targetDocumentType` | Result |
|---|---|
| Omitted | A copy of the same kind, as before |
| `Template` (or `2`), with an Article as the source | The copy is written as a Template, following the rules above |
| Any other value that changes the kind | `400 Bad Request`, with an input error on `TargetDocumentType` |

The request body is unchanged, and the response is the created document with `201 Created`.

## :fa-hand-point-right: Next Steps

* :fa-code: [Macros Reference][]  
* :fa-list-check: [Document Profiles][]  

## :fa-link-horizontal: Related Topics

* :fa-newspaper: [Knowledge base Articles][Articles]  
* :fa-puzzle-piece: [Snippets][]  
* :fa-book-open: [Reading Articles][]  
* :fa-magnifying-glass: [Content Search][]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/Articles/CreateFromTemplatePicker.png
[3]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/Articles/TemplateGuidanceCard.png
[4]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/Articles/CloneSplitButtonCopyAsTemplate.png

[Applications]:{ndr}/Administration/2.%20Monitor%20Management/5.%20Applications/Features/What%20is%20an%20Application.md
[Articles]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Overview.md
[C4 Article Links]:{ndr}/Repository%20Model/C4%20Diagrams/Designer/Repository%20Bindings.md#article-links
[Categories]:{ndr}/Administration/2.%20Monitor%20Management/4.%20Categories/Features/What%20is%20a%20Category.md
[Component Types]:{ndr}/Repository%20Model/Component%20Types/Overview.md
[Content Search]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Content%20Search.md
[Custom Metadata]:{ndr}/Repository%20Model/Custom%20Metadata/Overview.md
[Document Profiles]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Document%20Profiles.md
[Hero]:{ndm}/Documentation%20Pictures/IM/WebClient/Repository/Articles/Articles_FromTemplate.gif
[Inline Icons]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Macros%20Reference.md#fa-icons-inline-icons-with-ndx
[License Options and Feature Matrix]:{ndr}/Repository%20Model/License%20Options%20and%20Feature%20Matrix.md
[Macros Reference]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Macros%20Reference.md
[Permission Set for the Repository Model - Articles]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Features/Permission%20Set%20for%20the%20Repository%20Model.md#fa-newspaper-articles
[Permission Set for the Repository Model - Create]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Features/Permission%20Set%20for%20the%20Repository%20Model.md#fa-file-plus-create
[Reading Articles]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Reading%20Articles.md
[Resources]:{ndr}/Administration/2.%20Monitor%20Management/3.%20Resources/Features/What%20is%20a%20Resource.md
[Shipped by Nodinite]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Clone%20and%20Shipped%20Documents.md#fa-lock-shipped-by-nodinite
[Snippets]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Snippets.md
[Template Variables and Macros]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Create%20an%20Article.md#fa-code-template-variables-and-macros
[Ways to Create an Article]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Create%20an%20Article.md#fa-square-plus-ways-to-create-an-article
[Web API]:{ndr}/Core%20Services/Web%20API/Overview.md
[Writing a Profile-Based Article]:{ndr}/Repository%20Model/Knowledge%20base%20Articles/Features/Writing%20a%20Profile-Based%20Article.md