[TYPO3] TemplaVoila! Data Structure and Empty Content Elements

Peter Gallagher pgallagher at electricretina.com
Wed Jul 5 00:04:28 CEST 2006


I have read the tutorial (it is very good), I have searched the list 
endlessly it seems, I have read the ts_ref for .if and RECORDS ans 
stdWrap and I still don't know how to make an empty content element in 
my DS return nothing when there is no content.

Here is what I have in the DS:

I want to wrap the output in a <div> tag when there is content to 
display on the page, but when there is no content I want nothing displayed
...
<TypoScript>   
    10= RECORDS
    10.source.current=1
    10.tables = tt_content
     10.wrap = <![CDATA[<div 
class="content">]]>&lt;!--TYPO3SEARCH_begin--&gt; | 
&lt;!--TYPO3SEARCH_end--&gt;<![CDATA[</div>]]>
     10.if{
              isTrue.field = bodytext
               }      
</TypoScript>

Please Help.

-Peter


More information about the TYPO3-english mailing list