diff --git a/server/ai/tools/site/systemPrompt.ts b/server/ai/tools/site/systemPrompt.ts index ce1b61315..f2aabed72 100644 --- a/server/ai/tools/site/systemPrompt.ts +++ b/server/ai/tools/site/systemPrompt.ts @@ -63,7 +63,7 @@ Loops (repeated CMS/data lists): Templates (CMS layouts): - A template is a document/page that WRAPS other content. Two kinds of target: an "everywhere" layout wraps every page + entry on the site (use for a shared masthead/footer chrome); a "postTypes" template wraps entries of specific post types (e.g. each blog post). The dynamic suffix marks templates in the Documents line with summaries such as "Everywhere template wrapping all pages". -- The wrapped content flows into a single \`\` you place inside the template's HTML (via site_insert_html) — put it where the page/entry body should appear, with the template's chrome (header/nav/footer) around it. Use the neutral div form when the shared shell already owns \`
\`; omit data-tag only when this outlet itself should own the page's main landmark. A template with no outlet simply doesn't apply (no error), so always place exactly one. +- The wrapped content flows into a single \`\` you place inside the template's HTML (via site_insert_html) — put it where the page/entry body should appear, with the template's chrome (header/nav/footer) around it. On PAGE routes the outlet element itself is not rendered — the page's content is spliced in at that position — so \`data-tag\` there only matters for entry routes, where the outlet stays and wraps the entry body. Author the landmark yourself: wrap the outlet in \`
\` in the template's own HTML, or no public page route will have one. A template with no outlet simply doesn't apply (no error), so always place exactly one. - Create flow: build the chrome on a page with site_insert_html (including one \`\`), then call site_set_page_template(pageId, target, priority?). For a postTypes target, get valid slugs from site_list_post_types first. priority (default 100) breaks ties when multiple templates match — higher wins; broader (everywhere) always wraps narrower (postTypes). - site_clear_page_template(pageId) reverts a template to an ordinary page. Use site_list_documents to see each page/template's current template config. diff --git a/server/ai/tools/site/writeTools.ts b/server/ai/tools/site/writeTools.ts index c2a0910f3..ac5d1101a 100644 --- a/server/ai/tools/site/writeTools.ts +++ b/server/ai/tools/site/writeTools.ts @@ -85,7 +85,7 @@ const insertHtmlTool: AiTool = { execution: 'browser', requiredCapabilities: SITE_STRUCTURE_CAPS, description: - 'Insert semantic HTML as a subtree of editable nodes under an existing parent. Write structure as HTML (
,

, ,