|
|
|
@@ -89,6 +89,28 @@ Use `<set>` tag to create variables from queries:
|
|
|
|
|
<set :featured="'productos' | get({destacado: 1}, 'orden ASC', 3)"></set>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Header, footer, and site-wide style/JS — NOT regular files
|
|
|
|
|
|
|
|
|
|
`template/estandar/modulos/custom-header-twig/index-base.tpl` and the equivalent `custom-footer-twig`
|
|
|
|
|
one are **not editable as files** — `acai-write`/`acai-line-replace` reject them with
|
|
|
|
|
`"Forbidden path: ... es un artefacto generado del layout global"`. They're special general sections
|
|
|
|
|
(the header/footer of the **entire site**). The `.tpl` on disk is only a generated copy for fast reading
|
|
|
|
|
(`acai-view` works fine on it), but the real source lives in `layout.json` and is edited with the
|
|
|
|
|
`get_layout_field`/`set_layout_field` MCP tools (see
|
|
|
|
|
[docs/mcp-tools-reference.md](mcp-tools-reference.md)):
|
|
|
|
|
|
|
|
|
|
- `field: 'header'` / `field: 'footer'` — the header/footer templates themselves.
|
|
|
|
|
- `field: 'style'` — global CSS for the whole site.
|
|
|
|
|
- `field: 'javascript'` — global JS for the whole site (delegated listeners shared by every page live
|
|
|
|
|
here, not in any `.js` file in the repo — a `grep` of the repo for "how does X work in the header"
|
|
|
|
|
can find nothing even though X works fine in production).
|
|
|
|
|
|
|
|
|
|
Workflow for a header/footer/global-CSS/global-JS change: `get_layout_field({field: '...'})` → edit the
|
|
|
|
|
**full** string (there's no line-replace for this — `set_layout_field` is a destructive full-content
|
|
|
|
|
replace) → `set_layout_field({field: '...', content: ...})`. The response includes `compile_ok` —
|
|
|
|
|
verify it, same as any other write-op (see the reliability warning in
|
|
|
|
|
[docs/mcp-tools-reference.md](mcp-tools-reference.md)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Repeatable Content (multiv2)
|
|
|
|
|
|
|
|
|
|