[TYPO3] An exampe of usage of if-statement

Tapio Markula tapio.markula at dnainternet.net
Fri Jun 9 18:22:17 CEST 2006


Peter Klein wrote:
> Hi Tapio. I have told you this before. You need to READ the TSRef correctly, 
> otherwise you'll never learn it.
> 
> In your example you do something like this (I assume that "1" is either a 
> TMENU or a GMENU object.):
> 
>  1.if {
>      value.data = date:U
>      isLessThan.field = newUntil
>      negate = 0
> 
> }
> 
> From READING TSRef, you'll see that none of the TMENU/GMENU objects has any 
> "if" properties.
> http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/10/1/
> http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/10/7/
> http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/10/4/
> 
> So that's why your examples doesn't work..

Well that is not exaclty correct answer, Peter (in general your answers 
are ok).

I got this

TMENUITEM has got stdWrap stdWrap2 _and_ allStdWrap
GMENUITEM has got allStdWrap

Working solution for both TMENU and GMENU:

NO {
     allStdWrap.if {
           value.field = newUntil
           isGreaterThan.data = date:U
           negate = 1
     }
}

Joey (alias JoH)



More information about the TYPO3-english mailing list