.. include:: /Includes.rst.txt
.. _feature-107056-1753012116:
==================================================================
Feature: #107056 - Introduce headerData and footerData ViewHelpers
==================================================================
See :issue:`107056`
Description
===========
Two new Fluid ViewHelpers have been introduced to allow injecting arbitrary
content into the HTML :php:`
` or before the closing :php:`` tag
of a rendered page:
* :php:`` - injects content into the :php:`` section
* :php:`` - injects content before the closing :php:`` tag
The ViewHelpers internally use the :php-short:`\TYPO3\CMS\Core\Page\PageRenderer`
API and are useful when existing ViewHelpers such as
:php:`` or :php:`` do not support all required
attributes or use cases (for example, :php:`dns-prefetch`, :php:`preconnect`,
tracking scripts, or inline JavaScript).
Example usage for :php:``:
.. code-block:: html
Example usage for :php:``:
.. code-block:: html
Both ViewHelpers output the given content as-is. Any user-supplied input passed
to these ViewHelpers must be escaped manually to prevent Cross-Site Scripting
(XSS) vulnerabilities.
Impact
======
Extension authors and integrators can now use the new ViewHelpers to add raw
HTML content, such as :php:`` or :php:`