Save template
fabrement-save-templateCreate a site template — a header+footer frame around pages — or UPDATE one by templateId; every field is omit-to-keep. Check list-templates first: edit the existing one rather than make a duplicate. The header and footer are GLOBAL BLOCKS: find one with list-synced-patterns {kind:"header"}, or make one with save-synced-pattern {title, kind:"header", blocks}, then pass its id as headerPatternId. Rules: get-skill-doc {id:"template-contract"} — read it before the first call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Display name. Required on create; omit on update to keep. | |
| afterSlot | No | Blocks rendered BELOW the content on every page this template dresses. Read the current ones from get-template; a passed list REPLACES the zone, [] clears it, omitted keeps it. | |
| beforeSlot | No | Blocks rendered ABOVE the content on every page this template dresses. Read the current ones from get-template; a passed list REPLACES the zone, [] clears it, omitted keeps it. | |
| templateId | No | Template id to UPDATE (list-templates); omit to create. | |
| contentWidth | No | Width of the content area; "full" on create. | |
| contentSource | No | What the content slot renders: per-view `rules`. Without a rule for a view — or with contentSource omitted — the slot renders the page's own content. | |
| footerPatternId | No | The footer global block (list-synced-patterns {kind:"footer"}); same rules. | |
| headerPatternId | No | The header GLOBAL BLOCK (list-synced-patterns {kind:"header"}). Its words are changed with save-synced-pattern, never here. Create: omit = no header. Update: omit = keep, 0 = remove. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | ||
| ruleWarnings | No | Rules you sent that were already stored and can no longer render (their view or file is gone). They were KEPT; leave one out of contentSource to remove it. |