[TYPO3] Conditions for individual content elements

Krystian Szymukowicz t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Wed Sep 6 18:10:17 CEST 2006

Martin Kutschker wrote:

> Why? You have the list type stored in the record, so you can build a TS 
> case/if that checks for the type and the header.

hi Martin

I have similar problem: the content element header should be displayed 
only if there is content from the extension.

Following your advice I made:

tt_content.list.10.if.isTrue.cObject < plugin.any_extension

It works well. Header are displayed only if the ext content is not empty :)

...although I have feeling (from server time response) that the 
extension is executed twice. One time to check if it should show the 
header and second time to show the content.

As I need it for also for tt_news its a huge drawback.

I was also trying to use another way. In extension, when the content is 
empty, I set:
$GLOBALS['TSFE']->register['IS_EMPTY'] = '1';

and then in TS

tt_content.list.20.any_extension = COA
tt_content.list.20.any_extension.5 = TEXT
tt_content.list.20.any_extension.5.field = header
tt_content.list.20.any_extension.5.if.value = 1
tt_content.list.20.any_extension.5.if.equals.data = register:IS_EMPTY
tt_content.list.20.any_extension.5.if.negate = 1
tt_content.list.20.any_extension.10 < plugin.any_extension

it worked well but only if there was only one content element with 
any_extension at the page. If there was more than one then the second 
and later behaves like $GLOBALS['TSFE']->register['IS_EMPTY'] = '1' was 
not set at all! I do not know the reason why.

If anyone know an universal way to detect if the extension output is 
empty and according to that show or hide content element header please 
help :)

tt_content.list.10.if.isTrue.cObject < plugin.any_extension
the only way?


More information about the TYPO3-english mailing list