Design the template where you can see it
The templatedesigner tag captures a block of markup before Twig compiles it, writes it to your local templates folder, and sends it to production — on every page load, while you work.
Building a layout in a visual tool such as Stacks normally means copy, paste, upload, repeat to get the markup onto a server as a template, every time you nudge something. The Template Designer removes the middle three steps.
What each page load does
Wrap the markup in a templatedesigner tag and every page load on your development server:
- Saves it locally. The block is written to your local templates folder.
- Sends it to production. The same content goes to your production server's Designer API.
- Reports both. A bottom-right badge shows each result, names the template it synced, and offers a Copy Template button for the raw source.
- Stores source, not output. The tag is a preprocessor, not a renderer: it captures the raw block before Twig compiles it, so
{{ object.title }}is stored as source, not evaluated against whatever object is in scope.
Which server is rendering decides
- Silent on production. When the API URL matches the tag's
onparameter, meaning production is serving the page, the tag is a no-op: no sync, no badge, no performance overhead. - Local only. Omit the
tokenparameter and the block syncs locally only, for prototyping something not ready to go live. - Several blocks per page. Each syncs independently, with its own line in the badge.
Authorised per template
Enable the Template Designer toggle on a template in the admin and it generates a read-only Designer Token.
- One token, one template. That token, and only that token, authorises writes to that one template.
- Content only. The public endpoint accepts nothing but template content; the token and the enabled flag cannot be changed through it.
- A leak stays small. One leaked token exposes one template. Rotate it by regenerating the template's token in the admin.
In practice
What it looks like in a template
{% templatedesigner for 'products/tile' on 'https://example.com/tcms/' token 'abc123def456' %}
<article class="product-tile">
<h3>{{ object.title }}</h3>
<p>{{ object.summary }}</p>
<span class="price">{{ object.price | price }}</span>
</article>
{% endtemplatedesigner %}
On a development server this saves products/tile locally and pushes it to production; on production itself the same tag does nothing.
At a glance
What you get
- Inline, then synced
- Write the template in the page you are designing. Each page load saves it to the local templates folder and PUTs it to production.
- Raw source, not output
- A custom loader captures the block before compilation, so expressions are stored as source instead of being evaluated while you design.
- Silent on production
- When the API URL matches the tag's on parameter, the tag does nothing at all — no sync, no badge, no overhead.
- One token per template
- Each template gets its own auto-generated Designer Token. Compromising one does not affect any other template, and the API can only change content.
- Local-only mode
- Leave the token out and the template is saved locally and never pushed — the way to prototype something that is not ready for production.
Template Designer
Common questions
Does this slow down my production site?
No. When the page is served by the same server named in the tag's on parameter, the tag is a no-op — nothing syncs, no badge renders, and there is no performance overhead.
What authorises the update?
A per-template Designer Token, sent as an X-Designer-Token header or a token query parameter. The endpoint is public rather than session or API-key authenticated, and it accepts only the template's content.
Can I work on a template without touching production?
Yes. Omit the token parameter and the block is saved to your local templates folder only, with the badge reporting the remote sync as skipped.
Can one page sync more than one template?
Yes. A page can contain any number of templatedesigner blocks. Each syncs independently and gets its own entry in the status badge.
Try it on a site of your own.
45 days, every Pro feature, no credit card. Build it, hand it to a client, and see what they can and can’t touch.