---
name: contentful-cms-templates
description: "Create or edit templates (preContent, postContent, menu, footer, colours) in Contentful via cms-edit."
---

# Skill: contentful-cms — Templates

Use this skill when creating or editing **templates** (layout shells with preContent, postContent, menu, footer) in Contentful via `cms-edit`.

## Workflow

1. **Create** a template: `cms-edit create template --label 'Campaign Landing'`
2. **List** templates: `cms-edit list --type template`
3. **Open** by cmsLabel or ID: `cms-edit open --template-label "Default"` or `cms-edit open --id <template-id>`
4. Edit content: set **preContent** and **postContent** (content arrays) via session snapshot refs; use `add`, `set`, `remove`, `move` as for pages. Set **menu** and **footer** (single navigation links) with `cms-edit set @ref menu <nav-entry-id> --link` and same for `footer`.
5. Set **colours**: `cms-edit set @ref backgroundColour Navy`, `cms-edit set @ref textColour White` (or project colour names).
6. **Save**: `cms-edit save`

## Related skills

See the **core** skill for the full workflow (open, snapshot, set, save). For menu/footer navigation entries use the **navigation** skill.
