[TYPO3-english] pt_extlist with condition if else

bernd wilke t3ng at bernd-wilke.net
Wed Apr 1 14:20:06 CEST 2015


Am 01.04.15 um 12:32 schrieb Sebastian Gärtner:
> yearpaid is one specific year. The CASE seems to work. Am using it as we
> speak. Is what you are saying that the CASE can not be with a current
> year strtime function?

there is no possibility to have the key-values in a case statement being 
dynamic.

you may use a COA and if-statements

wrap.cObject = COA
wrap.cObject {
	10 = TEXT
	10.value = <div class="class1">|</div>
	10.if {
		equal.field = year_paid
		value.cObject = TEXT
		value.cObject {
			value = {$currentyear}
			prioriCalc = 1
		}
	}

	20 < .10
	20.value = <fiv class="class2">|</div>
	20.if.value.cObject.value = {$currentyear}-1
	
	30 < .10
	30.value = <fiv class="class3">|</div>
	30.if.value.cObject.value = {$currentyear}-2
	
	:
}

where currentyear is a constant

or you may build it more complex with {date:Y} and .insertData = 1

or any other way possible (more complex typoscript)


bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list