Comments

These documentation pages are no longer maintained. Please visit the new documentation site.

Just like in almost any programming language, comments can be used to add explanations, descriptions, etc. Template comments are not displayed in the resulting (X)HTML output that is generated by eZ publish. Commented chunks of template text/code will not be interpreted by the template engine.

There is only one way to add template comments, and that is by encapsulating the desired comment by a matching pair of the "{*" and "*}" sequence of characters. Clearly, 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 text/code. Nesting of comments is not supported. In other words, it is not possible to comment a comment. The following examples demonstrate the use of comments:

Single-line comment

{* This is a comment. *}

Will not produce any output.

Multi-line comment

{* This is a comment

  that spans across

  several lines in

  the template file. *}

Will not produce any output.

Nested comments

{* {* Nested comments are not supported! *}

This text will be displayed. *}

The following output will be displayed:

This text will be displayed.

Comments

Contents

The template language

Template code
Curly bracket issues
Comments
Variable types


Created

27/02/2004
3:26:45 pm
by Balazs Halasy

Last updated

27/02/2004
3:30:37 pm
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.