This documentation covers the frontend template system only. A separate backend Template Engine (server-side) uses different syntax (e.g.
{{ }}, @if, @foreach). You can use both on the same page: backend for initial render, frontend for live updates.When to use it
Use the frontend template engine when:- Content depends on the visitor — Cart items, item count, order total, selected bumps, coupon status.
- You want live updates — Adding to cart, changing quantity, applying a coupon, or toggling bumps should update the UI immediately.
- You control the layout — You design the structure (rows, labels, buttons) in the page builder; only the data is dynamic.
How it works
- Data lives in
window.efScope— The app (and cart/checkout plugins) put data here:cartItems,checkout,query, etc. - You use custom tags and expressions —
<template-if>,<template-foreach>,[[ path ]],ef-text,@click, and similar. - Scope changes update automatically —
window.efScopeis reactive. Changing values (including nested values and arrays) re-evaluates conditions, re-renders loops, and refreshes bindings.
Quick start
1. Put reactive data in window.efScope
2. Use custom tags and expressions in your HTML
3. Change scope directly (auto reactive)
data-ef-cloak— Hides the element until the template processor has run (removes the attribute when done). Use it to avoid a flash of raw[[ ... ]]or the wrong branch. On ElasticFunnels-hosted pages the platform already ships this stylesheet in<head>: it hides[data-ef-cloak]plus every engine tag — template-if, template-else-if, template-if-else, template-else, template-foreach, template-vars, template-set, template-partial / partial. If you embed the engine elsewhere, hide the full list; a tag left out of it paints its raw content on first paint and then disappears.
efScope for you.
What the engine provides
Builder-friendly bindings
For page-builder work, attribute bindings are often easier to preview and edit than mixed text tokens:Relation to other docs
- Frontend Template Engine (this section) — Full reference: syntax, scope, bindings, cart, checkout, limitations, debugging.
- Backend Template Engine — Documented in Backend Template Engine (server-side
{{ }},@if,@foreach, etc.).