[TYPO3] Section index and option split
JoH asenau
info at cybercraft.de
Mon May 14 12:08:43 CEST 2007
>> sorry I was wrong, not Joey but Bernhard... It was probably
>> kb_betterstdwrap that I'm thinking of.
>
> ok Endeed I would be delighted if I could get some advice how to
> do that using CASE/if and LOAD_REGISTER
You don't need them at all.
Use split instead, which will give you the optionSplit you wanted.
All you have to do is create a "splitter" in the output of your CONTENT
element.
Don't remember when I posted this the first time so here is a small example
similar to the one we are using in the cookbook:
10 = COA
10 {
10 = CONTENT
10 {
table = blah
select {
#blah
}
renderObj = COA
renderObj {
# blah
wrap = |###SPLITTER###
}
}
stdWrap.split {
token = ###SPLITTER###
cObjNum = 1 || 2 |*| 3 || 4 |*| 5 || 6
1.current = 1
1.wrap = <div class="wrap1">|</div>
2.current = 1
2.wrap = <div class="wrap2">|</div>
3.current = 1
3.wrap = <div class="wrap3">|</div>
4.current = 1
4.wrap = <div class="wrap4">|</div>
5.current = 1
5.wrap = <div class="wrap5">|</div>
6.current = 1
}
}
This will wrap ten entries like this:
wrap1, wrap2, wrap3, wrap4, wrap3, wrap4, wrap3, wrap4, wrap3, wrap5
The last element will always be empty since there is nothing after the last
###SPLITTER### so be sure to NOT put any wrap there unless you want some
special closing tags after your list of elements.
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
More information about the TYPO3-english
mailing list