Comments are used to document template code. They are not displayed in the final output like HTML comments are displayed. Comments are formatted using C-style delimiters - a comment begins with /* and ends with */. Comments must appear within the template (between [% and %]). An example follows:

[% some code; /* commentary */ more code %]

Nested comments are allowed. For example:

[% some code; /* commentary with /* nested */ comments */ %]

A pair of comment delimiters within their own code chunks is a handy way to remove any arbitrary template content from being processed.

[% /* %]

Some content.

Possibly with some [% code %]

[% */ %]

Tags