Reputation: 1362
Using typoscript, how do I split a field by linebreak and then split each line by :
?
This is what I have tried:
30 = TEXT
30.stdWrap {
field = abstract
split {
token.char = 10
wrap = <p>|</p>
1.current = 1
1.stdWrap.split {
token = :
wrap = <span>|</span>
}
}
}
Upvotes: 0
Views: 237
Reputation: 2557
Maybe, it's worth a look at dataProcessing
...
There is also a CommaSeparatedValueProcessor which can provide CVS-like data prepared as single values for use in Fluid.
Upvotes: 1
Reputation: 121
split
works with some global properties, so, nesting split
results into interference with values from previous split
. I prefer using individual ContentObjects:
page.10 = COA
page.10.10 = LOAD_REGISTER
page.10.10.splitParts = vorname:stefan,nachname:froemken
page.10.10.splitParts.split {
token = ,
1.current = 1
}
page.10.20 = TEXT
page.10.20.data = REGISTER:splitParts
page.10.20.wrap = <p>|</p>
page.10.20.split {
token = :
wrap = <span>|</span>
1.current = 1
}
page.10.30 = RESTORE_REGISTER
Stefan
Upvotes: 1