---
title: "Comment ViewHelper <f:comment>"
manual: "Fluid Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/fluid:typo3fluid-fluid-comment"
source: "ViewHelpers/Fluid/Comment.rst"
rendered: "2026-10-08T14:12:40+00:00"
---

# Comment ViewHelper `<f:comment>` {#typo3fluid-fluid-comment}

> [!NOTE]
> This reference is part of the documentation of Fluid Standalone.
> If you are working with Fluid in TYPO3 CMS, please refer to
> [TYPO3's ViewHelper reference](https://docs.typo3.org/other/typo3/view-helper-reference/14.3/en-us/Global/Comment.html) instead.

This ViewHelper prevents rendering of any content inside the tag.

Contents of the comment will **not be parsed** thus it can be used to
comment out invalid Fluid syntax or non-existent ViewHelpers during
development.

Using this ViewHelper won't have a notable effect on performance,
especially once the template is parsed. However, it can lead to reduced
readability. You can use layouts and partials to split a large template
into smaller parts. Using self-descriptive names for the partials can
make comments redundant.

## Examples {#examples}

### Commenting out fluid code {#commenting-out-fluid-code}

```php
Before
<f:comment>
    This is completely hidden.
    <f:debug>This does not get rendered</f:debug>
</f:comment>
After

```

Output:

```php
Before
After
```

Go to the source code of this ViewHelper: [CommentViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/CommentViewHelper.php).
