So I’ve been searchign the community but can’t find the solution!
I have a bunch of resoruces which are events. They are called like this:
[[pdoResources? &parents=`[[*id]]` &includeTVs=`availability` &tpl=`myTpl` ]]
In the resource, I can choose the availability of this event with a TV Radio button.
In myTpl, I want to change the content shown based on the value of the Radio button.
I can get it to work with two options using ‘else’, but I have three options - 1: limited, 2:sold out and the default if nothing is chosen.
This is my TPL so far which only works if ‘limited’ is chosen, but I need an ‘ElseIf’ for when a user chooses ‘sold out’. (I know I can’t use elseif with output modifiers)
<div class="box"> [[+tv.availability:is=`limited`:then=` //show this </a> `:else=` //show this `]] </div>
I tried nesting it like this - but it doesn’t work:
<div class="box"> [[+tv.availability:is=`limited`:then=` //show this </a> `:else=` [[+tv.availability:is=`sold-out`:then=` //show this </a> //show this ``:else=` //show this `]] </div>
Any hints on where I’m going wrong?
I suspect I need a snippet, but not sure how to construct it.