Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
split
This object is used to split the input by a character and then parse the result onto some functions.
For each iteration the split index starting with 0 (zero) is stored in
the register key SPLIT_
.
Properties
token
max
min
returnKey
returnCount
cObjNum
- Property
- cObjNum
- Data type
- cObjNum + optionSplit / stdWrap
- Description
- This is a pointer the array of this object ("1,2,3,4"), that should treat the items, resulting from the split.
1,2,3,4
- Property
- 1,2,3,4,...
- Data type
- cObject / stdWrap
- Description
-
The object that should treat the value.
Note: The "current"-value is set to the value of current item, when the objects are called. See stdWrap / current.
- Example for stdWrap
-
1.current = 1 1.wrap = <b> | </b>
Copied! - Example for cObject array
-
1 { 10 = TEXT 10.stdWrap.current = 1 10.stdWrap.wrap = <b> | </b> }
Copied!
wrap
- Property
- wrap
- Data type
- wrap + optionSplit / stdWrap
- Description
- Defines a wrap for each item.
Example
This is an example of TypoScript code that imports the content of
field "bodytext" from the $c
(ln 3). The content is
split by the line break character (ln 5). The items should all be
treated with a std
(ln 6) which imports the value of the item (ln
7). This value is wrapped in a table row where the first column is a
bullet-gif (ln 8). Finally the whole thing is wrapped in the proper
table-tags (ln 10). :
20 = TEXT
20.stdWrap {
field = bodytext
split {
token.char = 10
cObjNum = 1
1.current = 1
1.wrap = <tr><td><img src="dot.gif"></td><td> | </td></tr>
}
stdWrap.wrap = <table style="width: 368px;"> | </table><br>
}