Defining blocks

If you want to re-use certains parts of your HTML code multiple times, e.g. rows in a table, you can define blocks as described in the example above.

Blocks are not automatically detected, they need to be defined explicitely via the setBlock() method. The method takes the handle of the file in which the block is located as first parameter, the name of the block as written in the file as second and the new block handle as third parameter.

Defining a block

<?php
$t
->setBlock('authors''authorline''authorline_ref');
?>

In the example template (available as handle authors), a block named authorline is defined. The handle of the block is now authorline_ref.

Loading files (Previous) Setting variables (Next)
Last updated: Wed, 26 Nov 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.