Render sections HeaderAssets and FooterAssets automatically from ActionController and attach to PageRenderer
As the topic says, Fluid now allows directly rendering a specific section - which allows us to create an initializeAssetsForRequest method on ActionController, which can either be overridden or provide a default behavior. The default behavior is to render the two named (reserved names after change) sections and attach the output to header or footer of page response.
[FEATURE] Auto-render and attach HeaderAssets and FooterAssets
This patch adds a new method on ActionController,
initializeAssetsForRequest($request) which comes
with a default implementation and allows overriding
The default implementation of this new feature will
try to render sections HeaderAssets and FooterAssets
from the Fluid template that is resolved, assigning
the output (if not empty) to either header or footer,
by using the PageRenderer.
The feature only works for TemplateView and
subclasses thereof, since `renderSection` is not a
required method for ViewInterface implementations;
it only exists on the (MVC-centric) TemplateView.
Reviewed-by: Georg Ringer <email@example.com>
Tested-by: Georg Ringer <firstname.lastname@example.org>
Tested-by: TYPO3com <email@example.com>
Reviewed-by: Christian Kuhn <firstname.lastname@example.org>
Tested-by: Christian Kuhn <email@example.com>