[Typo3-dev] The quest of optionSplit : a first approach
JoH
info at cybercraft.de
Fri Nov 18 13:05:41 CET 2005
Jean-Baptiste Rio wrote:
> Hi JoH,
>
> the advantage or the main characteristic of optionSplit, IMHO, is that
> it takes into account an unknown number of contents or records. AFAIK,
> your example not, but it's a very interesting example by itself.
Well - a little rewrite does the trick:
temp.mySplittedContent = COA
temp.mySplittedContent {
10 < styles.content.get
stdWrap.split {
token = ###SPLITTER###
cObjNum = 1 || 2 || 3 |*| 4 || 5 |*| 6
1.current = 1
1.wrap = <div class="mycontent1">|</div>
2.current = 1
2.wrap = <div class="mycontent2">|</div>
3.current = 1
3.wrap = <div class="mycontent3">|</div>
4.current = 1
4.wrap = <div class="mycontent4">|</div>
5.current = 1
5.wrap = <div class="mycontent5">|</div>
6.current = 1
}
}
}
This one will work for an unknown number of entries.
With 12 entries you will get:
1 2 3
4 5 4 5 4 5 4 5
6
BTW: the original example would result in:
1 2 3 3 3 3 3 3 3 3 3 3
which is working for an unknown number of entries too, but not that
flexible.
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
More information about the TYPO3-dev
mailing list