KISS Macro to Create an Accordion

If you replace the following line

<$view field=caption/>

with this

<$set name="title"  filter={{{ [<currentTiddler>has[caption]get[caption]] [<currentTiddler>!has[caption]get[title]] }}}>

<$text text=<<title>> />

</$set>

It does the job.


I am not happy with my filter.

{{{ [<currentTiddler>has[caption]get[caption]] [<currentTiddler>!has[caption]get[title]] }}}

I think it can be shortened using then and else. But I could not figure out the syntax.