Skip to content

Commit

Permalink
Changing the order of the Content-supplying properties of stdWrap part (
Browse files Browse the repository at this point in the history
#793)

* Changing the order of the Content-supplying properties of stdWrap part

releases: main

Remark: In my opinion the "Example" and "Content-supplying properties" part, at the end of the site, should be moved back to the top, like in for example the 10.x version of TYPO3. Because if it is so far down, hardly anyone reads it, especially the part with the order is very important. If you see this differently or have suggestions for improvement through mistakes, then let me know.

https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Stdwrap.html

* Changing the order of the Content-supplying properties of stdWrap part

releases: main

Remark: In my opinion the "Example" and "Content-supplying properties" part, at the end of the site, should be moved back to the top, like in for example the 10.x version of TYPO3. Because if it is so far down, hardly anyone reads it, especially the part with the order is very important. If you see this differently or have suggestions for improvement through mistakes, then let me know.

https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Stdwrap.html
  • Loading branch information
FlorianT03 authored Sep 11, 2023
1 parent e0af15c commit 95d4c7b
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions Documentation/Functions/Stdwrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,40 @@ value as parameters.
.. contents:: Table of contents
:local:

Content-supplying properties of stdWrap
=======================================

stdWrap contains properties which determine what is applied. The properties
are listed below.

.. note::
The properties are parsed in the listed order. The
properties :typoscript:`data`, :typoscript:`field`, :typoscript:`current`, :typoscript:`cObject`
(in that order!) are special as they are used to import content
from variables or arrays.

If you want to study this further please refer to
:file:`typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php`,
where you will find the function :php:`stdWrap()` and the array :php:`$stdWrapOrder`,
which represents the exact order of execution.

Note that the :typoscript:`stdWrap` property "orderedStdWrap" allows you to execute
multiple :typoscript:`stdWrap` functions in a freely selectable order.

The above example could be rewritten to this:

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
10 = TEXT
10.value = some text
10.stdWrap.case = upper
10.stdWrap.field = header
Now the line :typoscript:`10.value = some text` is obsolete, because the whole
value is "imported" from the field called "header" from the
:php:`$cObj->data-array`.

Properties
==========

Expand Down Expand Up @@ -1687,7 +1721,6 @@ debugData

Only for debugging during development, otherwise output can break.


.. _stdwrap-examples:

Example
Expand All @@ -1708,36 +1741,3 @@ returned.

.. index:: Function stdWrap; Content-supplying properties
.. _stdwrap-content-supplying:

Content-supplying properties of stdWrap
=======================================

stdWrap contains properties which determine what is applied. The properties
are listed below.

The properties are parsed in the listed order. The
properties :typoscript:`data`, :typoscript:`field`, :typoscript:`current`, :typoscript:`cObject`
(in that order!) are special as they are used to import content
from variables or arrays.

If you want to study this further please refer to
:file:`typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php`,
where you will find the function :php:`stdWrap()` and the array :php:`$stdWrapOrder`,
which represents the exact order of execution.

Note that the :typoscript:`stdWrap` property "orderedStdWrap" allows you to execute
multiple :typoscript:`stdWrap` functions in a freely selectable order.

The above example could be rewritten to this:

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
10 = TEXT
10.value = some text
10.stdWrap.case = upper
10.stdWrap.field = header
Now the line :typoscript:`10.value = some text` is obsolete, because the whole
value is "imported" from the field called "header" from the
:php:`$cObj->data-array`.

0 comments on commit 95d4c7b

Please sign in to comment.