[TYPO3] Section index and option split
Tyler Kraft
headhunterxiii at yahoo.ca
Mon May 14 12:23:51 CEST 2007
Joey,
Thanks for reposting this! Very handy to have.
Ty
JoH asenau wrote:
>>> 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
>
More information about the TYPO3-english
mailing list