> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medwrite.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Templates

> Create and manage letter and document templates

Templates define how your letters and documents look. Each template can use **variables**: placeholders for **dynamic** patient or letter **data** (names, dates, clinic, letter content, and other fields). MedWrite fills those placeholders when the PDF or Word file is generated so every letter stays on-brand but the **details change** per patient and visit.

<Steps>
  <Step title="Viewing a Template">
    Open **Template Management** (`/pdf-management`). Filter by **Organisation**, **Document type**, **Clinic** (all clinics or one clinic), and **PDF** / **DOCX**. Use pagination if needed. Each card shows organisation, optional clinic, and dates.

    <Frame caption="Template list or template management.">
      <img src="https://mintcdn.com/medwriteai/5wp1zTLvuLiTjDfk/images/Screenshot_4-5-2026_151935_dev.medwrite.ai.jpeg?fit=max&auto=format&n=5wp1zTLvuLiTjDfk&q=85&s=ff67110158565ba275abb38b643c8087" alt="Template list or template management" style={{ borderRadius: '0.5rem', maxWidth: '100%' }} width="2491" height="1060" data-path="images/Screenshot_4-5-2026_151935_dev.medwrite.ai.jpeg" />
    </Frame>
  </Step>

  <Step title="Viewing a Template">
    Click on the eye icon to view template, this will allow you to see what the template will look like.

    <Frame>
      <img src="https://mintcdn.com/medwriteai/GeDr0qQlJEcXoTSN/images/templatepreview.png?fit=max&auto=format&n=GeDr0qQlJEcXoTSN&q=85&s=920bd833fb3264229e0c99a41482f548" alt="Templatepreview" width="2556" height="1120" data-path="images/templatepreview.png" />
    </Frame>
  </Step>

  <Step title="Edit a template">
    Click the **pencil** icon to open the **HTML Content Editor**. Use **Variables** to choose which **dynamic fields** appear in this template. Use **Run** (with optional sample data), **History**, and **Publish Template** when you are ready.

    <Frame>
      <img alt="Edit Templates" lightAlt="Edit Templates" darkAlt="Edit Templates" src="https://mintcdn.com/medwriteai/5wp1zTLvuLiTjDfk/images/Screenshot-2026-05-04-152459-1.png?fit=max&auto=format&n=5wp1zTLvuLiTjDfk&q=85&s=eeae07a6cd6c10aad61fddeff10dda6b" className="dark:hidden" width="2518" height="1185" data-path="images/Screenshot-2026-05-04-152459-1.png" />

      <img alt="Edit Templates" lightAlt="Edit Templates" darkAlt="Edit Templates" src="https://mintcdn.com/medwriteai/5wp1zTLvuLiTjDfk/images/Screenshot-2026-05-04-152459-2.png?fit=max&auto=format&n=5wp1zTLvuLiTjDfk&q=85&s=72f41699daa624d88dca500c45411c5b" className="hidden dark:block" width="2518" height="1185" data-path="images/Screenshot-2026-05-04-152459-2.png" />
    </Frame>
  </Step>
</Steps>

## Next steps

<Columns cols={2}>
  <Card title="Add PDF Template" icon="file-pdf" href="/essentials/add-pdf-template">
    Add a PDF template for letter output.
  </Card>

  <Card title="Add Word Template" icon="file-word" href="/essentials/add-word-template">
    Add a Word template for letter output.
  </Card>
</Columns>
