[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 in subclasses. 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. Change-Id: Ia815410637982c077236e12a848bdd26ead22e69 Releases: master Resolves: #79409 Reviewed-on: https://review.typo3.org/51380 Reviewed-by:Georg Ringer <georg.ringer@gmail.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/core/Documentation/Changelog/master/Feature-79409-AutorenderAssetSectionsInFluidTemplateWithController.rst 43 additions, 0 deletions...-AutorenderAssetSectionsInFluidTemplateWithController.rst
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php 40 additions, 0 deletions...ysext/extbase/Classes/Mvc/Controller/ActionController.php
- typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php 68 additions, 0 deletions...xtbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php
Please register or sign in to comment