Omitting an element & preserving children
The TAL omit-tag attribute allows an element's start and end tags to be removed from the rendered DOM, but for its children (text and elements) to be preserved.
Syntax
tal:omit-tag="EXPRESSION"
The expression
The expression (EXPRESSION
) is
evaluated as a TALES expression. If the result either
indicates that the action is to be cancelled, or it evaluates to
null
, then the attribute is treated as if the expression had evaluated to false.
Upon any other expression result, that result is then coerced to a boolean value. If this yields true then the element's start and end tags are omitted from the DOM in the rendering. If it yields false then the element's start and end tags are not altered.
Any HTML/XML elements prefixed with
tal:
or metal:
will exhibit the omit-tag behaviour.