[TW5] How do you test when a tiddler doesn't exist?

63 views
Skip to first unread message

c pa

unread,
Apr 9, 2015, 5:52:13 PM4/9/15
to tiddl...@googlegroups.com
I don't have a tiddler called ScrambledEggs

And yet <$list filter="[title[ScrambledEggs]]" emptyMessage="no tiddler">Tiddler Exists</$list> Outputs "Tiddler Exists"

<$list filter="[tag[ScrambledEggs]]" emptyMessage="no tiddler">Tiddler Exists</$list> Outputs "no tiddler"

Is there a way to test to see if a tiddler exists and display one thing if it does and another if it doesn't?

c pa

unread,
Apr 9, 2015, 6:07:40 PM4/9/15
to tiddl...@googlegroups.com
Got it!

<$list filter="[title[ScrambledEggs]is[tiddler]]" emptyMessage="""

Jed Carty

unread,
Apr 9, 2015, 7:01:12 PM4/9/15
to tiddl...@googlegroups.com
That is a more elegant solution than what I have been using, I have been testing for existence using [[ScrambledEggs]has[title]], thank you for sharing.
I am always surprised by how many things there are in tiddlywiki that I haven't seen.
Reply all
Reply to author
Forward
0 new messages