Project

General

Profile

Actions

Task #103882

open

unify additionalAttributes with includeCSS / includeJS

Added by Markus Volkmer 24 days ago. Updated 6 days ago.

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
reasons for change from data. to additionalAttributes.:
  • 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
reasons for change from key/value to additionalAttributes.:
  • 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

103882.md (4.17 KB) 103882.md Markus Volkmer, 2024-06-10 10:51

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #91499: Additional attributes for includeJS, includeCSS and all others include**Closed2020-05-26

Actions
Related to TYPO3 Core - Bug #100954: Additional attributes for page.include** partially brokenResolved2023-06-03

Actions
Actions #1

Updated by Markus Volkmer 24 days ago

  • Related to Feature #91499: Additional attributes for includeJS, includeCSS and all others include** added
Actions #2

Updated by Markus Volkmer 24 days ago

  • Related to Bug #100954: Additional attributes for page.include** partially broken added
Actions #3

Updated by Markus Volkmer 24 days ago

I could also start preparing a patch

Actions #4

Updated by Markus Volkmer 6 days ago

Summary/History of feature originally introduced with #91499

Actions

Also available in: Atom PDF