[TYPO3-english] Re: Re: pt_extlist with condition if else
Sebastian Gärtner
sg at esea.co.tz
Wed Apr 1 12:08:01 CEST 2015
Quote: Sebastian Gärtner (sebastiangaertner) wrote on Wed, 01 April 2015 11:58
----------------------------------------------------
> 10{
> label = UNTIL
> columnIdentifier = years_paid
> fieldIdentifier = years_paid
>
> renderObj = TEXT
> renderObj {
> field = years_paid
> wrap = <strong>|</strong>
> stdWrap.if {
> isInList = 2016
> value.field = years_paid
> }
> }
> }
>
>
> This is working now but now it only shows the ones where the condition applies. How can i deal with the else case
----------------------------------------------------
also made it as a CASE function which works almost better
15{
label = UNTIL
columnIdentifier = years_paid
fieldIdentifier = years_paid
field = years_paid
renderObj = CASE
renderObj {
key.field = years_paid
default = TEXT
value = <div class="alert alert-danger" role="alert">NOT PAID</div>
2016 = TEXT
2016.value = <div class="alert alert-success" role="alert">2016</div>
2015 = TEXT
2015.value = <div class="alert alert-info" role="alert">2015</div>
2014 = TEXT
2014.value = <div class="alert alert-warning" role="alert">2014</div>
2013 = TEXT
2013.value = <div class="alert alert-danger" role="alert">2013</div>
}
}
still hardcoded years ... Ideally its current year+1, currentyear, currentyear-1,currentyear -2
How would i go about that?
More information about the TYPO3-english
mailing list