Filter Q: is[tiddler OR shadow] - how?

So I’m doing some string chopping and want to know if the result is at all a tiddler or a shadow. How do I test for this?

is[] only takes one operand, and attempts with various filter prefixes don’t give me any success.

Thanx!

So you want to know if the tiddler exist at all ? Then you could use this: has[title]

Any tiddler, shadow or not, MUST have a title

1 Like

OUFFFF! When you say it, it is just totally obvious… but it wasn’t for me so a big thank you :grinning_face_with_smiling_eyes:

2 Likes

This is the solution I always go with, to see if it is a real tiddler.

And if you don’t consider an empty tiddler has having a value you can say has[text].

I recently discovered has[title] this easy to use with the button popup parameter;

<$button popup=<<state-tiddler>> >Click me toggles existence of state-tiddler</$button>

<$list filter="[<state-tiddler>has[title]]">
toggled content, use reveal as well
</$list>
1 Like

Judging from the ensued thread here, it seems I’m not the only one who has dealt with this so I made a doc PR.

1 Like