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

# Card Templates

> Understand how card templates work, from designing layouts to linking them to sessions for printing.

CaptrID includes a built-in card designer for creating professional ID cards. Templates are **organisation-level resources** — design once, reuse across multiple sessions.

## How templates work

There are two levels of templates in CaptrID:

| Level                     | Where                     | Purpose                                   |
| ------------------------- | ------------------------- | ----------------------------------------- |
| **Organisation template** | Card Design screen        | Shared design, reusable across sessions   |
| **Session copy**          | Session > Card Design tab | Customised version for a specific session |

### Organisation templates

These are your master designs. They live in the **Card Design** section of the sidebar and are available to all sessions in your organisation.

* Create, edit, duplicate, and archive from the Card Design screen
* Define **variables** (e.g. `{{first_name}}`, `{{student_id}}`) that get replaced with real data at print time
* One template can be linked to many sessions

### Session copies

If a session needs a slightly different version of a template (e.g. an event logo, different fields), you can create a **session copy**:

1. Open the session's **Card Design** tab
2. Find the org template you want to customise
3. Click **Customise for Session**
4. A copy is created that belongs to this session only — edits won't affect the original

<Info>
  Session copies don't count towards your plan's card template limit. Only organisation-level templates are counted.
</Info>

## Compatibility

When you open a session's Card Design tab, CaptrID automatically checks which organisation templates are **compatible** with that session's fields.

* **Compatible** — All variables used in the template exist in the session's fields. Ready to print.
* **Incompatible** — Some variables don't match the session's fields. You can create a session copy and adjust the design.

Compatibility is based on the template's **used variables** — only fields that actually appear on the card matter, not every variable in the schema.

## Field mappings

When a template's variable names don't exactly match a session's field names, **field mappings** bridge the gap.

For example, if your template uses `{{first_name}}` but the session field is called `given_name`, you can map them:

| Template variable | Session field |
| ----------------- | ------------- |
| `first_name`      | `given_name`  |
| `last_name`       | `family_name` |
| `student_id`      | `uid_value`   |

Field mappings are configured per session — the same template can use different mappings for different sessions. You can also set **default values** as fallbacks for missing fields.

## Creating a template

1. Go to **Card Design** in the sidebar
2. Click **Create Template**
3. Enter a name (e.g. "Student ID 2026" or "Staff Badge")
4. The card designer opens

## The card designer

The designer has three panels:

| Panel      | Purpose                                                       |
| ---------- | ------------------------------------------------------------- |
| **Left**   | Element palette — drag elements onto the canvas               |
| **Centre** | Canvas — your card design with drag, drop, and resize         |
| **Right**  | Properties — styling and positioning for the selected element |

### Adding elements

Drag elements from the left panel onto the canvas:

| Element     | Use for                                     |
| ----------- | ------------------------------------------- |
| **Text**    | Names, titles, department, any field data   |
| **Image**   | Photo placeholder, logos, background images |
| **Shape**   | Rectangles, lines, decorative elements      |
| **Barcode** | Barcode from a UID or other field           |
| **QR Code** | QR code linking to a URL or containing data |

### Using variables

Text elements can include **variables** that are replaced with real data when you print. Variables use double curly braces:

| Variable         | Prints as |
| ---------------- | --------- |
| `{{first_name}}` | Emma      |
| `{{last_name}}`  | Wilson    |
| `{{student_id}}` | STU001    |
| `{{year_level}}` | 7         |

You can import variables from a Master List or session schema, or define them manually.

### Canvas tools

* **Snap to grid** — Align elements precisely (configurable grid size)
* **Guidelines** — Show alignment guides
* **Zoom** — Zoom in/out for detail work
* **Multi-select** — Select multiple elements and align them together
* **Copy/paste** — Duplicate elements
* **Undo/redo** — Up to 50 steps of history

### Dual-sided cards

Toggle **dual-sided mode** to design both the front and back of a card. Switch between sides using the toggle at the top of the canvas.

## Previewing with real data

Click **Preview** to see your template with actual data instead of placeholder text:

1. Select a data source (session or Master List)
2. Browse through records using the arrow buttons
3. Check that fields, photos, and layout look correct with real content

<Tip>
  Always preview with real data before printing. Variables that don't map to a field will show as blank — preview helps you catch missing mappings.
</Tip>

## Page setup

Before printing, configure the page layout:

* **Orientation** — Portrait or landscape
* **Margins** — Space around the card on the printed page

## Exporting and printing

From the card designer or the session's Card Design tab:

* **Export as PDF** — Generate a print-ready PDF
* **Print directly** — Send to your browser's print dialog

## Common workflows

### Same template, multiple sessions

Link one organisation template to several sessions. Each session gets its own field mappings, so the same design works with different roster schemas.

### One-off event badge

Create a session copy from an existing template, add the event logo and date, print for this session only. The original template stays unchanged.

### Duplicating a template

From the Card Design screen, duplicate an organisation template to create an independent copy. Unlike session copies, duplicates are full organisation templates that can be linked to any session.
