Control-flow Chloe tags
Furnace framework > Furnace presentation layer > Chloe templates > Standard Chloe tags

Prev:Boilerplate Chloe tags
Next:Chloe link and form tags


While most control flow and logic should be embedded in the web actions themselves and not in the template, Chloe templates do support a minimal amount of control flow.
t:commentAll markup within a comment tag is ignored by the compiler.
t:bindRenders child content bound to a nested form named by the t:name attribute. See with-form.
t:eachRenders child content once for each element of the sequence in the value named by the t:name attribute. The sequence element and index are bound to the value and index values, respectively. See with-each-value.
t:bind-eachRenders child content once for each element of the sequence in the value named by the t:name attribute. The sequence element's slots are bound to values. See with-each-object.
t:evenOnly valid inside a t:each or t:bind-each. Only renders child content if the index value is even.
t:oddAs above, but only if the index value is odd.
t:ifRenders child content if a boolean condition evaluates to true. The condition value is determined by the t:code or t:value attribute, exactly one of which must be specified. The former is a string of the form vocabulary:word denoting a word to execute with stack effect ( -- ? ). The latter is a value name.