[TYPO3-dev] Re: Fluid TextMedia Whitespaces/New Line
Daniel Haring
daniel at haring.co.at
Tue Jan 12 09:14:21 CET 2016
Quote: Dim San (mrdakrness) wrote on Sun, 10 January 2016 01:11
----------------------------------------------------
> Hello community,
> at developing with 7.6 and Fluid Text Media I noticed the following:
> The source code has a lot of breaks/Whitespaces/New Lines.
> See the screenshot.
> Is the reason many Fluid templates? PHP-Code?
> I have found nothing at Google.
>
> I tested with:
> <f:format.html parseFuncTSPath="">{}</f:format.html>
> and:
> <f:format.raw>{}</f:format.html>
>
> Thanks
----------------------------------------------------
Hello Dim San,
this is because ViewHelpers are reserving space within the template but are not outputted at all.
The more ViewHelpers are used the more whitespace you will be faced to.
IMO this is nothing to be worried at all.
However, if this bothers you, you can reduce the amount of generated whitespace by making use of the »SpacelessViewHelper« (https://fluidtypo3.org/viewhelpers/fluid/7.6.0/SpacelessViewHelper.html).
Cheers,
Daniel
More information about the TYPO3-dev
mailing list