ViewTemplate to list tiddlers tagged with parent

75 views
Skip to first unread message

Mohammad

unread,
Feb 8, 2019, 2:20:41 PM2/8/19
to TiddlyWiki
I am trying to display the list of tiddlers tagged with parent tiddler, when the parent tiddler is opened.

So,

Title: myTemplate
Tag: $:/tags/ViewTemplate

<$list filter="[is[current]tagging[]] +[limit[1]]" variable="null" >
 Tiddlers tagged with <
<currentTiddler>>:
<$macrocall $name="list-links" filter="[is[current]tagging[]]" type="ol"/>
</$list>

Is there a better solution to this?

--Mohammad

TonyM

unread,
Feb 9, 2019, 2:59:57 AM2/9/19
to TiddlyWiki
Mohammad,

This looks as good as anyway I have seen or have built myself. I prefer the list widget over list-links, especialy rather than being forced to use macro call.

Also some solutions now and from twc build a toc below the current tiddler to see the tag tree.

Regards
Tony

Mohammad

unread,
Feb 9, 2019, 3:08:23 AM2/9/19
to TiddlyWiki
Thanks Tony for the hint!

--Mohammad

Jeremy Ruston

unread,
Feb 9, 2019, 3:34:58 AM2/9/19
to tiddl...@googlegroups.com
Hi Mohammad

<$list filter="[is[current]tagging[]] +[limit[1]]" variable="null" >
 Tiddlers tagged with <
<currentTiddler>>:
<$macrocall $name="list-links" filter="[is[current]tagging[]]" type="ol"/>
</$list>
Is there a better solution to this?
The only problematic part is <<currentTiddler>> -- using the double angle brackets syntax in the open like this causes the text in the target variable to be wikified. Thus, if you had a tiddler called "HelloThere Jeremy" the word "HelloThere" would be turned into a link to a different tiddler.

If you're displaying plain text, like a title, then it's better to use <$text text=<<currentTiddler>>/> to avoid wikification.

Best wishes

Jeremy.

--Mohammad

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e3d2360f-79b6-4c6d-b20a-77018d8526ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohammad

unread,
Feb 9, 2019, 5:16:41 AM2/9/19
to TiddlyWiki
Hello Jeremy,
 Many thanks for clarification.
 I corrected the code.

Best
Mohammad

Mohammad

unread,
Feb 9, 2019, 5:17:27 AM2/9/19
to TiddlyWiki
Added to TW-Scripts.


On Saturday, February 9, 2019 at 12:04:58 PM UTC+3:30, Jeremy Ruston wrote:
Reply all
Reply to author
Forward
0 new messages