[TYPO3] count tt_news records
Francois Suter
fsuter at cobweb.ch
Wed Dec 19 16:44:40 CET 2007
Hi,
> page.10.subparts.CONTENT = TEXT
> page.10.subparts.CONTENT.value {
> numRows {
> table = tt_news
> }
> }
I've never used numRows myself, but your basic syntax seems correct.
However what you want is to put that inside a if. construct, so you
should have something like:
page.10.subparts.CONTENT = TEXT
page.10.subparts.CONTENT {
value = Content to display if there are fewer than 3 news items.
if {
value {
numRows {
table = tt_news
}
}
isLessThan = 4
}
}
This is not tested and you often get if constructs reversed at first,
but it should hopefully help you on the way.
Cheers
François Suter
--
Cobweb Development Sàrl
www.cobweb.ch
Rue Eugène-Marziano 15, CH-1227 Les Acacias (Geneva - Switzerland)
T: +41 22 880 00 93, F: +41 22 880 00 94, E: support at cobweb.ch
web solutions for professionnal requirements
More information about the TYPO3-english
mailing list