Bug #104772
open<f:section name="HeaderAssets"> not working with PAGEVIEW
0%
Description
I wanted to use the new typoscript PAGEVIEW, but <f:section name="HeaderAssets"> does not generate any output. By the way: is it possible to use <f:section name="HeaderAssets"> in layouts as well instead of template file? It would be nice to write <f:section name="HeaderAssets"> only once if there are many templates.
Updated by Benni Mack about 2 months ago
- Status changed from New to Needs Feedback
This is a feature which is part of FLUIDTEMPLATE, and IMHO this should be handled nowadays via <f:asset.css> etc. or other solutions. What is your usecase?
Updated by Benjamin Franzke about 1 month ago
- Priority changed from Should have to Could have
Updated by Markus Sommer about 1 month ago · Edited
I have also noticed this behavior, and it seems to be related to the fact that the function for rendering the assets into the page renderer is not called. Specifically, the method \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::renderFluidTemplateAssetsIntoPageRenderer is not triggered.
I use this feature to integrate platform and device-specific tags, such as favicons and the manifest.json, into the page.
EXT:sitepackage/Resources/Private/Templates/Pages/Default.html
<f:section name="HeaderAssets">
<f:render partial="FavIcons" />
</f:section>
EXT:sitepackage/Resources/Private/Templates/Partials/FavIcons.html
<link rel="icon" type="image/png" href="/favicon-48x48.png" sizes="48x48" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Männerkreis Niederbayern" />
<link rel="manifest" href="/site.webmanifest" />
Current workaround
page.headerData.1000 = FLUIDTEMPLATE
page.headerData.1000.file = EXT:sitepackage/Resources/Private/Templates/Partials/FavIcons.html