[TYPO3-english] multiple conditions with if

Katja Lampela katja.lampela at lieska.net
Mon Apr 23 06:30:24 CEST 2012


Thank you Jigal for your informative help!

22.4.2012 15:22, Jigal van Hemert kirjoitti:
>
> Not much of a difference:
>
> 10 = TEXT
> 10 {
>      override {
>          cObject = TEXT
>          cObject {
>              value = 1234567890
>              ifEmpty = x
>              strftime = %d.%m.%Y
>          }
>      }
>      value = field2
>      ifEmpty = show some text
> }
>
> I assume that "field1" and "field2" are really database fields, so it can become:
>
> 10 = TEXT
> 10 {
>      override {
>          field = field1
>          ifEmpty = x
>          strftime = %d.%m.%Y
>      }
>      field = field2
>      ifEmpty = show some text
> }
>
> For 'ifEmpty' zero values are seen as empty. A value 'x' makes the strftime return nothing and thus in that case the 'override' is also empty.
>
> So, if field1 is zero or empty, the 'override' won't do anything and field2 takes over.
> If field2 is also empty 'show some text' will be displayed.

-- 
With kind regards

Katja Lampela
*Lieska-tuotanto*
www.lieska.net



More information about the TYPO3-english mailing list