[TYPO3] ifEmpty, show default from Constants
Peter Klein
peter at umloud.dk
Mon Aug 11 17:57:10 CEST 2008
Hi Bert.
According to TSRef, the select property "where" doesn't have stdWrap
support, but "andWhere" does.
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/5/5/
So try something like:
table = tt_news
join = INNER JOIN tt_news_cat_mm
andWhere = {$theDefault}
andWhere.override.data = GPvar:wecmap_category
andWhere.wrap = tt_news.pid=|
--
Peter Klein
"Bert Hiddink" <hiddink at bendoo.com> wrote in message
news:mailman.1.1218315484.18610.typo3-english at lists.netfielders.de...
> Hello!
>
> I have the following TS-snippet:
>
> [...]
>
> table = tt_news
> join = INNER JOIN tt_news_cat_mm
> where = tt_news.pid =
> where.stdWrap.wrap = | {GPvar:wecmap_category}
> where.insertData = 1
> [...]
>
> However, I need to add a condition here that if {GPvar:wecmap_category} is
> empty, a default value from the Constants ({$theDefault}) should be taken.
>
> I looked at stdWrap.ifEmpty but could not work this out. Could some help
> me with this?
>
> Many thanks in advance!
>
> -brt
>
> --
>
> Bert Hiddink
> Consultoría y Desarrollo Web
> Fundación Galileo - http://www.galileo.or.cr
> Información y Tecnología para el Desarrollo
> Tel/Fax: (506)2240-3484 y 2240-3430
>
> "Una década impulsando la Información y la Tecnología para el Desarrollo"
More information about the TYPO3-english
mailing list