Conditions
{{condition}} blocks keep or drop content. Conditions only accept variable
references; the namespace decides when the block collapses:
var.* / global.* / component.X.* / self.* collapse at publish (Tier 1) and never
appear in the cached pre_rendered HTML, while geo.* / param.* / ua.*
survive into the cache and collapse on every request (Tier 2). View this page's production source
to confirm the Tier-1 blocks are simply gone. A bare {{condition}} closes the
nearest open block; blocks resolve inside-out via a stack-based parser.
Truthy check
{{condition var.show_promo}}
<div class="demo-banner">{{var.promo_copy}}</div>
{{condition}}True values: "1", "true", "yes" (case-insensitive) or any non-empty string. The boolean SITE variable show_promo is seeded to 1 β flip it in the panel and the banner disappears on the next publish. Without an {{else}}, a false block is removed entirely.
Truthy with {{else}}
{{condition var.show_promo}}
<p>β
show_promo is truthy β you see the first branch.</p>
{{else}}
<p>β show_promo is falsy β you see the else branch.</p>
{{condition}}β show_promo is truthy β you see the first branch.
Equality and OR lists
{{condition geo.country="US"}}
<p class="demo-note">πΊπΈ Exact match: you are visiting from the United States.</p>
{{else}}
<p class="demo-note">Not a US visitor β {{geo.country_name}} ({{geo.country}}).</p>
{{condition}}Not a US visitor β ().
{{condition geo.country="US,CA,GB"}}
<p class="demo-note">Comma list = OR: you matched one of US, CA, GB.</p>
{{else}}
<p class="demo-note">You matched none of US, CA, GB.</p>
{{condition}}You matched none of US, CA, GB.
Nesting β resolved inside-out
{{condition var.show_promo}}
{{condition geo.country="US"}}
<p class="demo-note">Promo on + US visitor.</p>
{{else}}
<p class="demo-note">Promo on + non-US visitor ({{geo.country_name}}).</p>
{{condition}}
{{else}}
<p class="demo-note">Promo is off β the inner geo condition was never evaluated.</p>
{{condition}}Promo on + non-US visitor ().
A Tier-1 outer condition wrapping a Tier-2 inner one: if the outer is false at publish, the whole block (inner included) is stripped immediately. When the outer is true, the inner geo block survives into the cache and collapses per request.
One example per namespace
{{condition global.brand_name="Demo Brand"}}
<p>global.* equality: the global brand_name is "Demo Brand".</p>
{{condition}}{{condition param.utm_source="fb"}}
<p class="demo-note">π param.*: you arrived with ?utm_source=fb.</p>
{{else}}
<p class="demo-note">param.*: add <code>?utm_source=fb</code> to the URL to flip this branch.</p>
{{condition}}param.*: add ?utm_source=fb to the URL to flip this branch.
{{condition ua.device="mobile"}}
<p class="demo-note">π± ua.*: you are on a mobile device.</p>
{{else}}
<p class="demo-note">π₯ ua.*: you are on a {{ua.device}} device (not mobile).</p>
{{condition}}π₯ ua.*: you are on a desktop device (not mobile).
self.* β variant selection inside a component
A {{condition self.nameβ¦}} block resolves during component expansion (Tier 1, in the component's own scope) against the same precedence chain as a {{self.name}} output tag: inline arg β panel row β schema default. This is how variant-driven components select a skin. The demo-alert body:
<!-- component: demo-alert -->
{{condition self.variant="success"}}
<div class="demo-alert demo-alert--success">β {{self.message}}</div>
{{else}}
{{condition self.variant="warning"}}
<div class="demo-alert demo-alert--warning">β {{self.message}}</div>
{{else}}
<div class="demo-alert demo-alert--info">βΉ {{self.message}}</div>
{{condition}}
{{condition}}{{component.demo-alert variant="success" message="variant=success selected the success branch."}}
{{component.demo-alert variant="warning" message="variant=warning selected the warning branch."}}
{{component.demo-alert message="No variant arg β the schema default (info) selected the else branch."}}A self.* condition has no meaning outside its component, so it always collapses at expansion and never reaches the cache. A {{condition component.Slug.varname}} at page level works the same way against that component's variables.