Skip to main content

Comment

Video tutorial

General information about comments

Comments are used to document the source code or save internal notes. Comments are not visible to outsiders. The compiler ignores comments, i.e., the HTML source code does not contain this information.

Comments can be saved separately or within a code block. The structure of both variations is described below.

Comments in single-line code blocks

A comment is introduced using a left brace ({) followed by a hash/pound sign (). The comment can consist of one or several lines. The end of a comment is signaled using a hash/pound sign () followed by a right brace (}).

Comments in multi-line code blocks

Comments can also be used within multi-line code blocks ({% …​ %}). They are introduced using hash/pound sign (#). Comments within multi-line blocks end automatically at the end of the line and do not need to end with another hash/pound sign.

{%
	$_foo = "hello world"; # This is a comment

	# This is another comment
	print($_foo);
%}
To top