Button: Show images depending on a count result

Hello everybody!
Again I am not able to find the correct syntax for my current problem. Surely it is a simple task for most of you.

I am trying to make a button showing two different images depending on a count result.

The underlaying count request is

<$count filter="[has[encrypted]]"/>

which shows the correct number in my wiki.

In principle what I want to do is:
If
the result of that request above equals to 0
then
show imagetiddler1
else
show imagetiddler2

Any ideas how to bring that in an button definition? Thank you so much for your help an patience.

Best wishes
Oliver

You’ll probably use the ListWidget (…as always), perhaps something like:

<$list filter='[...something...has[encrypted]first[]then[imagetiddler1]else[imagetiddler2]]'>
<$image source=<<currentTiddler>>/>
</$list>

…but there are many variants.

1 Like

Wonderful! Thanks a lot twMat! That is exactly what I was looking for.
I’ve never seen this …first[]… trick. That eases things up.
Very cool, thanks again. :+1: