From 886788e98ef534a415cc1eccfb368a8c83fc0705 Mon Sep 17 00:00:00 2001 From: Sybille Peters Date: Wed, 13 Jul 2022 19:46:50 +0200 Subject: [PATCH] [TASK] Migrate Fluid comments from Extbase book Related: TYPO3-Documentation/TYPO3CMS-Book-ExtbaseFluid#536 --- Documentation/ApiOverview/Fluid/Syntax.rst | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/ApiOverview/Fluid/Syntax.rst b/Documentation/ApiOverview/Fluid/Syntax.rst index ee37dc48a6..338ba499d9 100644 --- a/Documentation/ApiOverview/Fluid/Syntax.rst +++ b/Documentation/ApiOverview/Fluid/Syntax.rst @@ -223,3 +223,39 @@ More complex example with chaining: {post.date -> f:format.date(format: 'Y-m-d') -> f:format.padding(padLength: 40)} +.. _fluid-comments: + +Comments +======== + +As the Fluid syntax is basically XML, you can use CDATA tags to comment +out parts of your template: + +.. code-block:: html + :caption: EXT:my_extension/Resources/Private/Templates/SomeTemplate.html + + + +If you want to hide the contents from the browser, you can additionally +encapsulate the part in HTML comments: + +.. code-block:: html + :caption: EXT:my_extension/Resources/Private/Templates/SomeTemplate.html + + + +Note: This way the content will still be transferred to the browser! If +you want to completely skip parts of your template, you can make use of +the **f:comment** view helper. To disable parsing you best combine it +with CDATA tags: + +.. code-block:: html + :caption: EXT:my_extension/Resources/Private/Templates/SomeTemplate.html + +