Skip to content

What it does not do

It does not render T4 tags or Handlebars. Nothing local can. <t4 .../> tags, Handlebars expressions and Programmable Layouts are evaluated by T4’s own publish engine, in Java, against the CMS database. There is no standalone renderer, and T4’s helpers ({{element}}, {{media}}, {{sectionName}}, the whole set) are proprietary to that engine.

So the two halves of this tool hold different things, and neither is a substitute for the other:

What it holds Tags in it
t4 mirror + t4 serve Published output Already evaluated: real HTML
t4 pull Layout source Unevaluated: {{...}} as literal text

The practical consequence: a mirror is the right place to work on CSS, JS and markup structure, because it is exactly what a visitor’s browser receives. It is the wrong place to test layout logic. Open a mirrored page and the template is already resolved; open a pulled .hbs file in a browser and you see {{sectionName}} printed on the page.

Layout logic still has to be tested in T4: Preview, Direct Edit, or a staging channel. The loop this tool shortens is the front-end one: edit CSS, JS or markup, reload, and see it against real published pages, with no publish cycle. Layout previews go some way further, by reusing what each tag already published. The loop it does not shorten is changing a layout’s logic.

What it does give you for layout work is version control, diffing and review: you can see what changed in a layout, who changed it, commit it with t4 save and push a reviewed change.

Sample data is a partial exception, and it is worth being exact about how partial. t4 fixtures substitutes an invented value into every <t4 type="content"> tag, using the element types the Content Type declares, so a layout can be seen with something in it before anything is published. That answers one question (does the markup nest correctly, does the CSS apply, does a long value wrap) and only that one.

Locally, with sample data Only in T4
A content tag Filled with an invented value Resolved against the real item
A modifier (striptags, nl2br) Ignored Applied
navigation, media, meta Left visibly marked Resolved
Handlebars ({{#if}}, {{#each}}) Not evaluated Evaluated
A Programmable Layout Not run Run

So conditional logic is still not testable locally. A layout that shows one thing when an element is set and another when it is not has two behaviours, and sample data fills the element, so you see one of them. Which one you see is decided by the fixture, not by the layout. Emptying the element with --values shows the other branch, but you are choosing the answer rather than discovering it.

For anything that branches, Preview, Direct Edit or a staging channel is still where it gets tested. Sample data shortens the loop on markup and styling; it does not shorten the loop on logic.

An independent, unofficial tool. Not produced, endorsed or supported by TERMINALFOUR Solutions Ltd, and not TERMINALFOUR software. “T4” and “TERMINALFOUR” are their trademarks, used here only to identify the software this works with. Copyright © 2026 Small Robot Corp. Source available under the PolyForm Shield License 1.0.0.