[Typo3] conditionnal output and TemplaVoila
Grégory Duchesnes
gregory at icilalune.com
Sat Dec 17 17:48:29 CET 2005
Ouch!
Now it does something if i use isFalse : nothing ever outputs (content
or div tags) and even if there's a content
Unfortunately if i use isTrue, div tags are always there even if there's
no content.
I'm going to read your links and find my way in this typoscript maze ;)
Duch
Bernhard Kraft a écrit :
>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 :
>
>http://typo3.org/documentation/document-library/doc_core_tsref/RECORDS/
>
>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.source.current=1
> 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:
>http://typo3.org/documentation/document-library/doc_core_tsref/COBJ_ARRAY_COA_COA/
>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:
>
>http://typo3.org/documentation/document-library/doc_core_tsref/if/
>
>
>
>greets,
>Bernhard
>_______________________________________________
>Typo3-english mailing list
>Typo3-english at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
>
More information about the TYPO3-english
mailing list