[Typo3] conditionnal output and TemplaVoila

Bernhard Kraft kraftb at kraftb.at
Sat Dec 17 17:25:30 CET 2005

Grégory Duchesnes wrote:

> I don't understand what the isFalse (or isTrue) line do? It interacts
> with the wrap function? and wrapping is done only if the condition is met?
> Do you see what could be wrong?

".if" should output "nothing" of the cObject if the condition is not met.

But I just had a look at :


and noticed it doesn't have any output. So you will most probably need
to use a containing COA like:

5 = COA
5 {
   # The only sub-cObj
  10 = RECORDS
  10.tables = tt_content

   # Define wrapping and condition
  wrap = <div id="optionnal_content"> | </div>
  if.value.current = 1
  if.isFalse = 1
# if.isTrue = 1

What this does is that it uses a COA (cObj Array - kind of container) to "house" the
RECORDS cObj. And define the wrap.

As you can read on:
this cObj supports an .if property:

if	->if	if "if" returns false the COA is NOT rendered

which means it is ABSOLUTLY NOT rendered. not even the wrapping.

you can read about .if here:



More information about the TYPO3-english mailing list