Benoit Sautel <email@example.com>
This interface describes data which are assigned to a template. There are two
types of data:
Variables: there are string that are directly displayed
Templates: you can embed a template in another one. When a subtemplate is
displayed, it's parsed using its own data and the result is inserted where the
subtemplate is embedded.
A template contains global variables which are available in the whole template
and local variable which are only defined into a loop. To define a loop, you
just have to use assign_block_vars with the same loop identifier for each loop
iteration. Loops can be nested and embed both variables and subtemplates.
Loads the most common vars which are useful in the whole PHPBoost templates. The
THEME the theme used by the current user
LANG the lang used by the current user
IS_USER_CONNECTED tells whether the user is connected (member, moderator or
IS_ADMIN tells whether the user is administrator
IS_MODERATOR tells whether the user is moderator
PATH_TO_ROOT is the path which starts from the domain root (in HTTP context)
and goes to the PHPBoost root. For instance if PHPBoost is installed at www.example.com/directory/, its
value will be /directory.
PHP_PATH_TO_ROOT is the server side path, it's the path which goes to the
TOKEN is the CSRF protection token. It's to use in the critical actions to
show that the user really intended doing the action
string $array_vars A map var_name => var_value. Generally, var_name is written in
Template $subtemplates The list of subtemplates to embed in the loop's iteration.
Assigns a template block. A block represents a loop and has a name which be used
in your template file to indicate which loop you want to browse. To know what
syntax to use to browse a loop, see the class description, there are examples.