[TW5] How to list (iterate over) tags of certain tiddler?

480 views
Skip to first unread message

Dmitry Skopa

unread,
Nov 14, 2014, 3:00:16 PM11/14/14
to tiddl...@googlegroups.com
Hello,

I've just started paying with tiddlywiki to setup my personal organizer from scratch. I don't want go get some of existing tw assemblies like 

Now I'm trying to setup a todo list in which every [task] tiddler is shown together with its tags. Currently I have this:

<$list filter="[!is[system]tag[task]!tag[done]sort[created]]">
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox> {{!!tags}}
</$list>



The problem is {{!!tags}} just gives me a text containing tag titles divided with commas, but I need to get a list to be able to filter it and apply some style or maybe include a link to it.

So basically I need a nested <$list> construction for each tiddler tags. But how can I reference list of tags for a current tiddler item in a list?

Tobias Beer

unread,
Nov 14, 2014, 4:01:03 PM11/14/14
to tiddl...@googlegroups.com
Hi Dmitry,

Take a look at how it's done in the ViewTemplate...



Then you can construct something like...

<table>
<$list filter="[!is[system]tag[task]!tag[done]sort[created]]">
<tr>
<td><$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox></td>
<td><$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/></td>
</tr>
</$list>
</table>

Best wishes, Tobias.

Tobias Beer

unread,
Nov 14, 2014, 4:06:07 PM11/14/14
to tiddl...@googlegroups.com
If you dont want the task tag itself displayed, you can do...

<table>
<$list filter="[!is[system]tag[task]!tag[done]sort[created]]">
<tr>
<td><$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox></td>
<td><$list filter="[all[current]tags[]sort[title]]-[[task]]" template="$:/core/ui/TagTemplate" storyview="pop"/></td>
</tr>
</$list>
</table>



Best wishes, Tobias.

Tobias Beer

unread,
Nov 14, 2014, 4:10:56 PM11/14/14
to tiddl...@googlegroups.com
You can see a working demo here...


Best wishes, Tobias.

Дмитрий Скопа

unread,
Nov 14, 2014, 6:36:16 PM11/14/14
to tiddl...@googlegroups.com
Thank you! This is exactly what I need.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/9QSUefgrhDM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
___________
Regards,
Dmitry Skopa
Reply all
Reply to author
Forward
Message has been deleted
0 new messages