[TYPO3-ttnews] How to test if a list is empty, from TypoScript

Olivier Schopfer ops at wcc-coe.org
Mon Sep 3 11:36:16 CEST 2007


Hi there,

I'm looking for a way to test if a LATEST list is empty, in order to 
automatically adapt the layout of the page (=hide all the COA).

The if condition below doesn't work. Does anybody have an idea of how to 
make if work?

Olivier
ops at wcc-coe.org


# News
lib.NewsAndEvents = COA

lib.NewsAndEvents {
	5 = TEXT
	5.value = News on this activity
	5.wrap = <td style="vertical-align:top;"><h3 class="newstitle">|</h3>

	10 < plugin.tt_news
	10.pid_list = 1722
	10 {
		code >
		code = LATEST
		templateFile = fileadmin/templates/wcc-main/tt_news_home.html
		pid_list.dataWrap = |, {page:uid}
		catImageMode = 0
		catTextMode = 0
		categoryMode = 1
		categorySelection.field = field_news_categ_uid_list
		latestLimit = 3
		noNewsToListMsg_stdWrap.override = empty
                 noNewsToListMsg_stdWrap.wrap = |
	}

	15 = TEXT
	15.value = All news on this activity
	15.typolink.parameter = 1634
	15.typolink.additionalParams.dataWrap = 
&tx_ttnews[cat]={field:field_news_categ_uid_list}
	15.wrap = <p>|</p>
         25 = TEXT
         25.value = </td>
}

lib.NewsAndEvents.if {
	value < lib.NewsAndEvents.10
	equals = empty
	negate = 1
}


More information about the TYPO3-project-tt-news mailing list