2011-11-18 48 views
1

我使用下面的TypoScript呈现内容:条件包裹在Typo脚本

temp.addcol5 = CONTENT 
temp.addcol5 { 
    table = tt_content 
    select { 
    pidInList = this 
    orderBy = sorting 
    where = colPos = 5 
    languageField = sys_language_uid 
    } 
} 
temp.addcol5.wrap = <div class="content middle"> | </div> 

我只希望如果有任何数据库中的记录来包装内容。我怎样才能做到这一点?

回答

4

你可能想尝试

temp.addcol5.stdWrap { 
 wrap= <div class="content middle"> | </div> 
 required =1 
}