[Typo3] conditionnal output and TemplaVoila

Bernhard Kraft kraftb at kraftb.at
Sat Dec 17 14:24:26 CET 2005


Grégory Duchesnes wrote:
> I have a div in my HTML corresponding to an optionnal content, i'd like
> this div to be completely removed when no content is present. I tried

*arr* as Capt. McCallister from Simpsons would say :) This is a nice problem
but this time with TV.

 typoscript this way :
> 
> <TypoScript>
> <![CDATA[
>  10= RECORDS
>  10.source.current=1
>  10.tables = tt_content
>  10.wrap = <div id="optionnal_content"> | </div>
>  10.ifEmpty {
>    wrap =
>  }
> ]]>
> </TypoScript>
> 
> 

better typoscript this way :)

10= RECORDS
10.source.current=1
10.tables = tt_content
10.wrap = <div id="optionnal_content"> | </div>
10.if.value.current = 1
10.if.isFalse = 1
# 10.if.isTrue = 1

If isFalse does not what you want but the opposite (doesn't show anything when something is in the column :)
then try isTrue and comment out isFalse


greets,
Bernhard



More information about the TYPO3-english mailing list