Is current a suffix of other tid?

55 views
Skip to first unread message

Mat

unread,
Mar 28, 2021, 4:48:31 PM3/28/21
to TiddlyWiki
Did I dream this or was there very recently (past week?) someone asking about this very problem that I just stumbled upon? Can't find the question, if there ever was one. Regardless, I wonder if there's any clever way filter to find out if:

     the current tiddler title is a suffix of any other tiddler title

It will be used as part of a viewtemplate so it is important that it is an "economical" filter.

The situation occurs because I have tiddlers titled like paths e.g

MyFolder/Img1.jpg
MyFolder/Doc1

...and I have a mechanism to create tiddlers with titles as the last "step" in those paths, i.e "Img1.jpg" and "Doc1" but these tiddlers should show some data from their corresponding path tiddlers in a ViewTemplate. A tiddler can have multiple pathtiddlers.

Thank you!

<:-)

Saq Imtiaz

unread,
Mar 28, 2021, 5:19:53 PM3/28/21
to TiddlyWiki
I have a similar scenario in some of my wikis, and using split[/] and is[tiddler] was how I approached it.
Further specifics will depend on details like whether there can only be two levels or multiple, and whether only the first level (root) needs to exist or all preceding levels.

Mark S.

unread,
Mar 28, 2021, 5:37:26 PM3/28/21
to TiddlyWiki
I don't quite understand the question. Isn't this what the suffix operator does ?

Mat

unread,
Mar 28, 2021, 5:55:29 PM3/28/21
to TiddlyWiki
Mark is right - I somehow missed the suffix op.
Thank you both!

<:-)

P.S @Mark: link 

Reply all
Reply to author
Forward
0 new messages