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 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
OUFFFF! When you say it, it is just totally obvious… but it wasn’t for me so a big thank you
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>
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.