#103882unify additionalAttributes with includeCSS / includeJS
Description
Currently the behaviour of #91499 is different depending on the variant of page.includeCSS* / includeJS* used.
See following table for an overview:
| data.data-xxx / data.foo | data-xxx / foo | |
| ——————— | ————————————— | ———————— |
| CSS | Exception | + |
| CSSLibs | Exception | + |
| JS | + | – |
| JSFooter | + | – |
| JSLibs | Exception | + |
| JSFooterlibs | Exception | + |
Exception means: array to string exception as there is a string expected when an array gets delivered
+: working
-: not working
When using page.includeJS / page.includeJSFooter you have to add additional attributes as data-array.
But when using includeCSS or one of the libs-variants you must not use data-array but deliver additional attributes as key-value pairs directly.
This issue is opened as FollowUp of #100954 which was already marked ad resolved.
Following ideas were already collected:- “quickfix” for v12 to use both variants data.foo and foo side by side in all cases
- add a “new” param to includeCSS*/includeJS* -> additionalAttributes to overtake the functionality
- mark data. and the plain usage of data-main deprecated in v13 and remove in v14
- it is not only about data-attributes
- data in TypoScript is in some way related to getText
- additionalAttributes is already used as wording in fluid for the same topic
- separate parameters with defined functions from those with just free behaviour
- easier to handle with specified array collecting all additional attributes, see includeJS/includeJSFooter in \TYPO3\CMS\Frontend\Http\RequestHandler