Introduction -- Creating and Parsing templates


The format of placeholder is
This means, the name of the placeholder can consist of upper- and lowercase letters, underscores and hypens. The name must be placed between curly brackets without any spaces. Valid names are i.e.:


Non-valid names are i.e.

{ Placeholder 3 } (spaces)
{place*holder} (char isn't permitted)


The format of a block is
<!-- BEGIN [0-9A-Za-z_-]+ -->
... block content ...
<!-- END [0-9A-Za-z_-]+ -->
The rules for the block name are the same like for placeholders. In contrast to placeholders the spaces in the block markup are required.

The nesting of blocks is permitted, but be careful while parsing. You have to set and parse the deepest inner block first and then set and parse from inner to outer.

In IT the whole template file itself is nested in a virtual block called "__global". Most block-related functions use this block name as default.

© Copyright 2003-2023 The ultimate PHP Editor and PHP IDE site.