Feature: #108726 - Introduce Fluid f:render.contentArea ViewHelper
See forge#108726
Description
Instead of using the
<f: and
<f: ViewHelpers to render content areas,
the new
<f: ViewHelper can be used.
It allows rendering content areas while enabling other extensions to modify the output via PSR-14 EventListeners.
This is especially useful for adding debugging wrappers or additional HTML structure around content areas.
By default, the ViewHelper renders the content area as-is, but EventListeners
can listen to the
\TYPO3\ and modify the output.
You need to use the PAGEVIEW config like this:
page = PAGE
page.10 = PAGEVIEW
page.10.paths.10 = EXT:my_site_package/Resources/Private/Templates/
<f:render.contentArea contentArea="{content.left}"/>
or
{content.left -> f:render.contentArea()}
The ViewHelper also supports wrapping each content element with additional markup if combined with the <f:render.record> ViewHelper:
<f:render.contentArea contentArea="{content.main}" recordAs="record">
before {record.fullType}
<f:render.record record="{record}" />
after {record.fullType}
</f:render.contentArea>
Impact
Theme creators are encouraged to use the
<f: ViewHelper
to allow other extensions to modify the output via EventListeners.