[TYPO3-english] Combining 2 conditions with TS: cObj:parentRecordNumber=2 AND colPos=0

JoH asenau info at cybercraft.de
Fri Jun 7 14:33:11 CEST 2013


>>> There are several options, but I prefer this one:
>>>
>>> dataWrap.if {
>>>    value = 2#0
>>>    equals.dataWrap = {cObj:parentRecordNumber}#{field:colPos}
>>> }
>> Wow, that's nice and compact! Works, thanks a lot!
>
> And how if I would like OR instead of AND?

A bit of overhead in this case, so maybe there is a smarter solution, 
but this one should work:

dataWrap.if {
   isTrue.cObject = COA
   isTrue.cObject {
     10 = TEXT
     10.value = 1
     10.if.isFalse.field = colPos
     20 = TEXT
     20.value = 1
     20.if.value = 2
     20.if.equals.data = cObj:parentRecordNumber
   }
}

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
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