Skip to content

Commit

Permalink
Simplify over-enginered optionSplit
Browse files Browse the repository at this point in the history
  • Loading branch information
kitzberger committed Aug 3, 2023
1 parent 16c80eb commit 64eb143
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 50 deletions.
17 changes: 4 additions & 13 deletions Configuration/TypoScript/ContentElement/ContentElement.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,10 @@ lib.contentElement {
}
stdWrap.split {
token = ###BREAK###
cObjNum = 1 |*|2|*| 3
1 {
current = 1
stdWrap.wrap = |
}
2 {
current = 1
stdWrap.wrap = ,|
}
3 {
current = 1
stdWrap.wrap = |
}
cObjNum = 1|*|2|*|1
1.current = 1
2.current = 1
2.stdWrap.wrap = ,|
}
}
appearance =< lib.appearance
Expand Down
19 changes: 4 additions & 15 deletions Configuration/TypoScript/ContentElement/Shortcut.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,10 @@ tt_content.shortcut {
innerWrap = [|]
split {
token = ###BREAK###
cObjNum = 1 |*|2|*| 3
1 {
current = 1
stdWrap.wrap = |
}

2 {
current = 1
stdWrap.wrap = ,|
}

3 {
current = 1
stdWrap.wrap = |
}
cObjNum = 1|*|2|*|1
1.current = 1
2.current = 1
2.stdWrap.wrap = ,|
}
}
}
Expand Down
17 changes: 4 additions & 13 deletions Configuration/TypoScript/Page/Categories.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,9 @@ categories {
}
stdWrap.split {
token = ###BREAK###
cObjNum = 1 |*|2|*| 3
1 {
current = 1
stdWrap.wrap = |
}
2 {
current = 1
stdWrap.wrap = ,|
}
3 {
current = 1
stdWrap.wrap = |
}
cObjNum = 1|*|2|*|1
1.current = 1
2.current = 1
2.stdWrap.wrap = ,|
}
}
12 changes: 3 additions & 9 deletions Documentation/Developer/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,10 @@ Here's an example of how you can create a JSON array of multiple objects from a
# Replace 'inner tokens' by comma, remove others
split {
token = ###BREAK###
cObjNum = 1 |*|2|*| 3
1 {
current = 1
stdWrap.wrap = |
}
2 < .1
cObjNum = 1|*|2|*|1
1.current = 1
2.current = 1
2.stdWrap.wrap = ,|
3 < .1
}
}
}
Expand Down

0 comments on commit 64eb143

Please sign in to comment.