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 4 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 4 months ago
- Priority changed from Should have to Could have
Updated by Markus Sommer 4 months 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
Updated by Rafal Brzeski 18 days ago
Thanks @Markus Sommer for the workaround, it helped me alot insert meta tags in more convenient way than typoscript.
I was also confused why it wasn't working. It would definitely be more consistent if PAGEVIEW supported the same syntax as FLUIDTEMPLATE.