Skip to content

Commit

Permalink
[TASK] Add example with path to stdWrap.insertData (#646)
Browse files Browse the repository at this point in the history
This is helpful when migrating to typo3/cms-composer-installers v4+.

Releases: main, 11.5

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
  • Loading branch information
brotkrueml and linawolf committed Nov 27, 2022
1 parent d08609e commit 9d77fa2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Documentation/Functions/Data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,18 @@ path
lib.foo.data = path : EXT:rsaauth/resources/rsaauth.js
It can also be helpful in combination with
:ref:`stdWrap.insertData <stdwrap-insertdata>`:

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
page.headerData.10 = TEXT
page.headerData.10 {
value = <link rel="preload" href="{path : EXT:site/Resources/Public/Fonts/Roboto.woff2}" as="font" type="font/woff2" crossorigin="anonymous">
insertData = 1
}
.. _data-type-gettext-register:

register
Expand Down
5 changes: 5 additions & 0 deletions Documentation/Functions/Stdwrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,11 @@ insertData
10.value = This is the page title: {page:title}
10.stdWrap.insertData = 1
# TEXT is already stdWrapable, so we can also use insertData right away
20 = TEXT
20.value = <link rel="preload" href="{path : EXT:site/Resources/Public/Fonts/Roboto.woff2}" as="font" type="font/woff2" crossorigin="anonymous">
20.insertData = 1
.. warning::
Never use this on content that can be edited in the backend. This allows editors to disclose
normally hidden information. Never use this to insert data into wraps.
Expand Down

0 comments on commit 9d77fa2

Please sign in to comment.