[TYPO3] An exampe of usage of if-statement
Tapio Markula
tapio.markula at dnainternet.net
Thu Jun 8 09:02:01 CEST 2006
Hi
TS REF has this example
This is a GIFBUILDER object that will write "NEW" on a menu-item if the
field "newUntil" has a date less than the current date!
...
30 = TEXT
30.text = NEW!
30.offset = 10,10
30.if {
value.data = date: U
isLessThan.field = newUntil
negate = 1
}
in
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/5/7/
Well I tried that for menu states
tt_content.menu.20.5 {
special {
limit = 10000
maxAge = 360000*24*183
}
1.NO=0
1.if {
value.data = date:U
isLessThan.field = newUntil
negate = 0
}
1.NO=1
1.alternativeSortingField=newUntil,lastUpdated,tstamp,uid
1.NO.after.cObject < temp.after
}
The condition doesn't have any effect.
I got some condition to work with TEXT object,
for example
11=TEXT
11{
field=lastUpdated
if{
value = 0
equals.field = lastUpdated
negate=1
}
date=d.m.Y
}
But I don't now figure, what's wrong with menu items
More information about the TYPO3-english
mailing list