Basic parse() example. Filling a list from an array.
Let's fill a HTML table from a two-dimensional array.
{table_item} |
This is used to output a sequence of elements that may have different presentation, consider things like normal and selected elements in menu. The much more complex example is the ITDynamic renderer of HTML_QuickForm.
touchBlock() is used to show the blocks that would be considered empty and therefore will be removed.
{touch_stuff} | {touch_quantity} | This row is intentionally left blank (and thus should be removed) |
hideBlock() is used to hide the blocks that would be shown due to their non-empty status, in this case 'edit' links.
If you need a copy of a block somewhere else in the template...
This is a copy of the block from section 1:
{duplicate}