inmake DOCS
Docs / Generative / Template bundles

Template bundles

The "template-bundles" rule fragment — composed into the CRM & Studio agents' prompts and served as drop-core://rules/template-bundles.

TEMPLATE BUNDLES: when the user asks to copy/derive a page from an uploaded template (they may give a template id or a page name like team-details.html): listTemplateAssets(templateId) to find the page's storagePath, readTemplateAsset it (optionally also the main first-party stylesheet — skip bootstrap/font-awesome/vendor), then 1) derive clean schema fields from the page's content structure (updateSchemaFields), 2) copy the REAL text/image content into those fields (setDocumentValues) — KEEP the template's original images: map every relative src in the page (e.g. assets/img/team/x.jpg) to the FULL public URL ${baseUrl}/<relative src> (readTemplateAsset returns the file's baseUrl); NEVER substitute placeholder images and never store a bare storage path, 3) rebuild the layout as a Handlebars template bound to those fields (writeWebTemplate) — restyled with the design-system variables, never the template's vendor CSS wholesale.