Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Comments

This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation!

Just like in almost any programming language, comments can be used to add explanations, descriptions, etc. Template comments are ignored by the parser and will not be displayed in the resulting HTML output.

There is only one way to add template comments, and that is by encapsulating a block of code by a matching pair of the "{*" and "*}" sequence of characters (left curly bracket + asterisk and asterisk + right curly bracket). In other words, a template comment is just like any other template code except that the curly brackets are accompanied by adjacent asterisks. It is possible to comment both single and multiple lines of code. However, nesting of comments is not supported (it is not possible to comment a chunk of code that already is a comment). The following examples demonstrate the use of comments.

Single line comment

{* This is a single line comment. *}

The example above will not produce any output.

Multi-line comment

{* This is a long comment that
    spans across several lines
    within the template file. *}

The example above will not produce any output.

Nested comments (illegal)

{* {* Nested comments are not supported! *}
This text will be displayed. *}

The example above will produce the following output:

This text will be displayed.

Balazs Halasy (16/02/2005 9:12 am)

Ricardo Correia (17/04/2013 1:18 pm)

Balazs Halasy, Ricardo Correia


Comments

There are no comments.