Actions
Task #103882
openunify additionalAttributes with includeCSS / includeJS
Status:
New
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2024-05-23
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
includeJS includeCSS
Complexity:
medium
Sprint Focus:
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
Files
Updated by Markus Volkmer 6 months ago
- Related to Feature #91499: Additional attributes for includeJS, includeCSS and all others include** added
Updated by Markus Volkmer 6 months ago
- Related to Bug #100954: Additional attributes for page.include** partially broken added
Actions