Retired Documentation:  You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to the latest version.

Commenting Template Code

ExpressionEngine allows developers to comment their templates in an easy syntax so that the comments will be available to them when editing their templates but the comments will never be displayed when that template is displayed. This allows developers to jot down notes about their usage of tags, variables, plugins, and even PHP in templates for future reference while keeping users from ever seeing those notes.

Note: ExpressionEngine comments must be stored directly in the template. When stored in any type of variable, the comments will be rendered directly to the screen.

The syntax for commenting your template code is fairly similar to HTML comments, just instead of the greater than and lesser than symbols, you use the opening and closing curly quote brackets, like with other EE Tags:

{!--

Your comments will go in here.
You can even span it across multiple lines.

--}

Any ExpressionEngine code that you put in these comments will NOT be rendered, so you can comment out old code or perhaps reference tags for later:

{!--

{exp:weblog:entries weblog="recipes"}
{title}
{/exp:weblog:entries}

Once the weblog is set up and the old data inserted, use this below.

--}

Top of Page