Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Configure additional attributes with "includeJS" #797

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
**data**: Array with key/value for additional attributes to be added to
the script tag.

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
Loading