Skip to content

Commit

Permalink
[BUGFIX] Configure additional attributes with "includeJS"
Browse files Browse the repository at this point in the history
Resolves: #788
Related: https://forge.typo3.org/issues/100954
Releases: main, 12.4
  • Loading branch information
brotkrueml committed Sep 11, 2023
1 parent 913fc4a commit 9a25d95
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Documentation/Setup/Page/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ includeJS.[array]
.. versionadded:: 12.1
Additional data attributes can be configured using a key-value list.
Additional attributes can be configured using a key-value list using
the :typoscript:`data` key.
Example
.. code-block:: typoscript
Expand All @@ -712,9 +713,14 @@ includeJS.[array]
# Include another file for consent management
# A data attribute enriches the tag with additional information
# which can be used in the according JavaScript
# which can be used in the according JavaScript.
# This results in "<script data-consent-type="essential" ...></script>"
consent = EXT:site_package/Resources/Public/JavaScript/consent.js
consent.data-consent-type = essential
consent.data.data-consent-type = essential
# Another attribute can also be defined also with the "data" key.
# This results in "<script other-attribute="value" ...></script>"
consent.data.other-attribute = value
jquery = https://code.jquery.com/jquery-3.4.1.min.js
jquery.external = 1
Expand Down

0 comments on commit 9a25d95

Please sign in to comment.