[TYPO3-english] SPLIT_COUNT and prioriCalc

JoH asenau info at cybercraft.de
Mon Jun 3 11:28:45 CEST 2013


Am 02.06.2013 19:37, schrieb Roberto Torresani:
> Hi!
> I have a question with a typoscript code:
>
>        10 = TEXT
>        10.field = tsc_immagine
>        10.split {
>          token = ,
>          cObjNum = 1
>          #1.current = 1
>          1.cObject = IMAGE
>          1.cObject.file {
>            import = uploads/pics/
>            import.current = 1
>          }
>          1.stdWrap.dataWrap = <li data-thumb="images/thumb{REGISTER
> :SPLIT_COUNT}.jpg">|</li>
>        }
>
> What is the best way to add 1 to REGISTER:SPLIT_COUNT?

Simply use an additional separator before the string and use optionSplit 
to "eliminate" it.
This way it would be much faster than calculating the desired value for 
each image.

10 = TEXT
10.field = tsc_immagine
10.stdWrap.wrap = ,|
10.split {
   token = ,
   cObjNum = 2 || 1
   1.cObject = IMAGE
...

the rest would be the same as in your code.

HTG

Joey


-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com


More information about the TYPO3-english mailing list