Review main Merged

58976[FEATURE] Allow to override htmlTag attributes

Benni Mack CR +2 V +2 Normal +170 −12 updated 12/03/18, 19:47

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 4