section of website * * # Example: Basic example * * * * * * * Added to the header: * */ class HeaderDataViewHelper extends AbstractViewHelper { use CompileWithRenderStatic; /** * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * * @return void */ public static function renderStatic( array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ) { $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); $pageRenderer->addHeaderData($renderChildrenClosure()); } }