Documentation · ViewHelper reference

CommentViewHelper


This ViewHelper prevents rendering of any content inside the tag
Note: Contents of the comment will still be **parsed** thus throwing an
Exception if it contains syntax errors. You can put child nodes in
CDATA tags to avoid this.

Examples

Commenting out fluid code

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

Output

Before
After

Prevent parsing

<f:comment></f:comment>

Output


  • Tag usage example

    <f:comment>
    	<!-- tag content - may be ignored! -->
    </f:comment>
  • Inline usage example

    {f:comment()}

Arguments

Argument Description Type
Required attribute

Revision history

commit 637b2592e65ec2d3dd1959ebc6038d09904f2207
Author: Claus Due <*****@wildside.dk>
Date:   Sun Aug 21 15:04:52 2011 +0200

    [+FEATURE] Comment ViewHelper
    
    This adds a commenting ViewHelper to prevent output and parsing
    of specific parts of Fluid templates.
    Usage:
    <f:comment>This won't be rendered</f:comment>
    
    Change-Id: I68634012ad99a004020a13d0dbfcded3fd2c0970
    Resolves: #13592

commit fd09d197fa8886b97cb20aa9573f39cd08ce989e
Author: Bastian Waidelich <*****@typo3.org>
Date:   Thu Nov 10 18:27:58 2011 +0100

    [TASK] S*****@author annotations
    
    This backports three recent changes of the TYPO3.Fluid package:
    - R*****@license annotation from files (290f4f5)
    - Simplify license header in PHP files (14bacba)
    - D*****@author tags from source code (9c2e837)
    
    This should not contain any functional change!
    
    Change-Id: I9376dca4af78c4f0f82413011d115b8ad04634dd

commit 0632b7e1c86ce2d0534361bad7bf71c0fadb0d93
Author: Bastian Waidelich <*****@typo3.org>
Date:   Fri Feb 24 11:01:09 2012 +0100

    [TASK] Cleanup/Fix ViewHelper doc comments
    
    This tweakes some ViewHelper doc comments so that they can be
    rendered with the new Reference command introduced with #33675.
    No functional changes.
    Backported from #33675
    
    Change-Id: Id61467382d0d983b661dbb817d95f3b50bc66f48
    Related: #33675

commit ca40f8a066da4ea3c849d74f68a9bc73758976c5
Author: dkd-egerer Sascha Egerer <*****@dkd.de>
Date:   Sat Apr 14 21:43:10 2012 +0200

    [TASK] Remove trailing whitespace
    
    There must be no empty lines after the closing
    PHP tag. Empty lines after closing tags break
    output compression in PHP and/or result in AJAX
    errors.
    
    Change-Id: I0484ca29d8134d0828cf30880d5aafd43ed9d78e
    Resolves: #36076
    Releases: 6.0
    Reviewed-on: http://review.typo3.org/10499
    Reviewed-by: Ingo Pfennigstorf
    Tested-by: Ingo Pfennigstorf
    Reviewed-by: Daniel Lorenz
    Tested-by: Daniel Lorenz
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn

commit 7a964695c9f0cc537782684c0ade735d2d06ee51
Author: Tymoteusz Motylewski <*****@gmail.com>
Date:   Fri Jul 20 23:29:17 2012 +0200

    [TASK] Backport Fluid from FLOW3 1.0.5
    
    Make Extbase Fluid in sync with FLOW3 1.0.5 (Fluid rev 152ae289)
    
    Change-Id: I0c043b6cc7bc7e3dac0145d83a2ff885a34b5cfc
    Resolves: #39149
    Releases: 6.0
    Reviewed-on: http://review.typo3.org/12952
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn
    Tested-by: Oliver Klee
    Reviewed-by: Daniel Lorenz
    Tested-by: Daniel Lorenz
    Reviewed-by: Felix Oertel
    Tested-by: Felix Oertel

commit ec3891d8d4e339d8319428211207e6201be9fd73
Author: Thomas Maroschik <*****@dfau.de>
Date:   Wed Oct 17 21:18:26 2012 +0200

    [TASK][WIP] Move non class code back to source files
    
    Change-Id: I620d2e61860142cdc89cc83474c95542799961c0

commit 554e8f890dcc0dd86a27518b58e2b54be26fd37e
Author: Thomas Maroschik <*****@dfau.de>
Date:   Wed Oct 17 22:20:17 2012 +0200

    [TASK] Namespace classes
    
    Change-Id: Ia7432e1c923826ed58206bca15fb94509adbd508

commit 9d13dedf017b614b834261b1bf5d4acb2201f1d4
Author: Alexander Schnitzler <*****@typovision.de>
Date:   Fri Nov 16 19:49:02 2012 +0100

    [CLEANUP] Replace FLOW3 with TYPO3 Flow
    
    Releases: 6.0
    Fixes: #43036
    Change-Id: I62df23587301b4cde3ddeae3686b34f54fe1182e
    Reviewed-on: http://review.typo3.org/16498
    Reviewed-by: Alexander Schnitzler
    Tested-by: Alexander Schnitzler

commit 9d46e6932d35c79bf87c96fa38b8e537c4192f23
Author: Alexander Schnitzler <*****@typovision.de>
Date:   Tue Nov 20 16:27:02 2012 +0100

    [CLEANUP] Adjust code to CGL and fix small namespace bugs
    
    * whitespaces, tabs and blank line issues
    * bool -> boolean
    * int -> integer
    * fix wrong namespace annotations
    
    Fixes: #43157
    Releases: 6.0
    Change-Id: I8397948e19248db029d8efd1555ee56e4982742d
    Reviewed-on: http://review.typo3.org/16619
    Reviewed-by: Helmut Hummel
    Tested-by: Helmut Hummel

commit 0ddc5aa4aa0d5331cec0a3dee75e6400ce06b603
Author: Tymoteusz Motylewski <*****@gmail.com>
Date:   Sat Feb 9 17:54:41 2013 +0100

    [TASK] Sync CMS Fluid with Flow Fluid 1.1 (part1)
    
    This is the first part of a backport fluid from Flow.
    It contains small changes, mostly CGL related.
    
    Change-Id: I72ccac5427638f8525e6b9c754dc5eafb5095dc1
    Releases: 6.1
    Resolves: #44819
    Reviewed-on: https://review.typo3.org/17725
    Reviewed-by: Wouter Wolters
    Tested-by: Wouter Wolters
    Reviewed-by: Marc Bastian Heinrichs
    Tested-by: Marc Bastian Heinrichs

commit 77f29a3c69a7cbb27b34072754aa503bace6c9f1
Author: Christian Kuhn <*****@schwarzbu.ch>
Date:   Tue Oct 1 14:40:56 2013 +0200

    [TASK] Remove closing PHP tags
    
    Change-Id: Iaa92566c53301e49396fc9fb26b0b339c48d567b
    Resolves: #52360
    Releases: 6.2
    Reviewed-on: https://review.typo3.org/24212
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn
    Reviewed-by: Ernesto Baschny
    Tested-by: Ernesto Baschny
    Reviewed-by: Anja Leichsenring
    Tested-by: Anja Leichsenring