Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • typo3 typo3
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Insights
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • typo3typo3
  • typo3typo3
  • Repository
Switch branch/tag
  • typo3
  • typo3
  • sysext
  • frontend
  • Classes
  • Http
  • RequestHandler.php
Find file BlameHistoryPermalink
  • Benni Mack's avatar
    [FEATURE] Allow to override htmlTag attributes · 8a811b6e
    Benni Mack authored Nov 29, 2018
    The new Site handling functionality should ideally avoid
    TypoScript conditions as much as possible. However,
    if someone wanted to add attributes via config.htmlTag_setParams
    all language-dependant properties (e.g. dir and lang) which
    are generated by the site configuration are gone, leading to the
    way of having to workaround this issue by using stdWrap or conditions)
    
    In order to re-implement this functionality but also build on a
    more flexible level, a new TypoScript property
    "config.htmlTag.attributes." is added, which is an array
    for setting attributes to the <html> tag dynamically.
    
    This superseds the previous config.htmlTag_setParams option
    by providing a more flexible API to add attributes.
    
    `config.htmlTag.attributes.class = no-js`
    
    It is even possible to add attributes without a value:
    `config.htmlTag.attributes.amp = `
    
    would render `<html lang="en" amp>` - keeping the existing
    parameters that are set by other TypoScript anyways.
    
    Resolves: #87033
    Releases: master
    Change-Id: I6a18671fffbf97aab8d3dda938dc261706e4e6fd
    Reviewed-on: https://review.typo3.org/58976
    
    
    Reviewed-by: Josef Glatz's avatarJosef Glatz <josef.glatz@typo3.org>
    Tested-by: default avatarTYPO3com <no-reply@typo3.com>
    Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
    Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
    Reviewed-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
    Tested-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    8a811b6e