< CMS Certified Integrator 14 LTS

ViewHelper: Page.headerData, Page.footerData

TYPO3

Show in app

Beschreibung

f:page.headerData allows code to be injected into the HTML <head> of a rendered page. Its counterpart, f:page.footerData injects code right before the closing </body> tag. Both ViewHelpers were introduced in TYPO3 14, use the PageRenderer API, and output their content as-is, which means any user-supplied input must be escaped manually to prevent XSS vulnerabilities.

Ziele

  • I know that f:page.headerData places its content inside the HTML <head> section and f:page.footerData places its content directly before the closing </body> tag.
  • I know that both ViewHelpers rely on the PageRenderer API.
  • I know when to use f:page.headerData instead of f:asset.css or f:asset.script.
  • I know when to use f:page.footerData instead of f:asset.script.
  • I know that both ViewHelpers output their content without any escaping.

Maintainer

Oliver Thiele Web Development Oliver Thiele