Update page
update_pageUpdate a page record: name (changes the slug), SEO, home/404/hidden flags, pathPattern, and policy: a password, who may open it (access conditions and what a denied visitor gets), a body class, per-page CSS variable overrides. Head code and hiding the header/footer are edits to the page file. list_pages({ pageId }) shows a page's current policy. Takes effect for visitors on publish. Guide: get_style_reference({ topic: "pages" }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Site id. | |
| seo | No | Per-page SEO fields to set. | |
| name | No | New name; changes the slug. | |
| pageId | Yes | Page id from list_pages. | |
| policy | No | Page policy; each key merges, and "" or [] clears it. password: text (stored hashed, never shown back). access: condition groups, OR'd, [{ logic: "all"|"any", conditions: [{ type: "auth", key: "status", operator: "equals", value: "logged-in" }] }]. failAction + redirectUrl | fallbackPath: what a denied visitor gets. bodyClass: classes for <body>. themeOverrides: [{ varName: "primary", value: "oklch(...)" }] CSS variables for this page. | |
| isHidden | No | Hidden pages aren't reachable by URL. | |
| is404Page | No | Make it the 404 page. | |
| isHomePage | No | Make it home (unsets the current one). | |
| pathPattern | No | URL tail AFTER the page's own slug, for detail pages. Segments: literal or `:param`, no leading slash: `:slug` on page "Car" serves /car/<slug>. Read captures as `request.params.<name>`. Empty string clears. |