Comments

TypoScript supports single line comments as well as multiline comment blocks.

Note

Changed in version 12.0.

Comment handling has been relaxed significantly with the rewritten TypoScript parser in TYPO3 v12. The parser is much less picky detecting comments, they can be placed almost everywhere since v12, */ no longer needs to be on a single line, and comments are auto-closed at the end of a single text snippets.

// and # indicate a comment. Everything until the end of the line will be ignored by the parser. /* indicates a multiline comment start, */ stops it.

When using //, # and /* after an assignment =, this is not considered a comment, but part of the value! Same is true for multiline assignments.

Some examples:

Extension examples, file Configuration/TypoScript/Syntax/Comments/setup.typoscript
 # This is a comment
 // This is a comment
 /* This is a
    multiline comment */

 foo < bar // This is a comment
 foo < bar /* This is a valid comment, too */

 foo > # Another valid comment

 foo := addToList(1) # Yes, a comment

 [foo = bar] # Many comment. Much wow.

 foo (
   # This is NOT a comment but part of the value assignment!
   bar = barValue
 ) # This is a comment

 foo = bar // This is NOT a comment but part of the value assignment!