tiddler list with titles and tags

277 views
Skip to first unread message

Captain Packers

unread,
Mar 12, 2018, 9:18:10 AM3/12/18
to TiddlyWiki
I'm wondering if it's possible to create a list of tiddlers and display both their titles and tags in the list. I'm familiar with creating lists and showing their titles and using filters to customize the list, but I don't know how to display the tiddlers tags as part of the list, or if that's even possible.

Cheers,

Captain Packers

Eskha

unread,
Mar 12, 2018, 9:44:27 AM3/12/18
to TiddlyWiki
Hi Captain,

The tiddler tags are stored in the "tags" field so you can display them with the
{{!!tags}}
syntax inside the list widget.


If you want to display them so that they look like ... tags, you can use the following template :
"$:/core/ui/TagTemplate"
with the syntax

{{!!tags||$:/core/ui/TagTemplate}}

(in that case you even don't need to use the !!tags part)


You can look at the  "custom item output" of the ListWidget documentation on Tiddliwiki.com for an illustration

<$list filter="[tag[ListWidget]sort[title]]">
<<currentTiddler>>
{{||$:/core/ui/ViewTemplate/tags}}
</$list>

Best regards,

Eskha

Don Lund

unread,
Mar 12, 2018, 10:12:13 AM3/12/18
to tiddl...@googlegroups.com
Thanks Eskha.

How would you modify something like this:

<$list filter="[!has[draft.of]tag[Tasks]!tag[Done]tag[Next]]">
<$checkbox tag="Done"> 
<$link to={{!!title}}><$view field="title"/></$link><br>
</$checkbox>
</$list><br>

so that the tags could be included with the title as part of <$view field="title"/>, maybe appended to the title and separated by hyphens?

Is that possible?

Regards,
Don Lund
Milan, MI

Love so amazing, so divine,
Demands my soul, my life, my all.
Isaac Watts, pub.1707

--
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/5WR6PIx3HH0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@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/19f45e42-ba90-4feb-b4f3-97e67edb56e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jed Carty

unread,
Mar 12, 2018, 10:49:00 AM3/12/18
to TiddlyWiki
Yes, that is possible. Try this:

<$list filter="[!has[draft.of]tag[Tasks]!tag[Done]tag[Next]]">
<$checkbox tag="Done"> 
<$link to={{!!title}}><$view field="title"/></$link> <$list filter='[<currentTiddler>tags[]]'><<currentTiddler>>-</$list>
</$checkbox><br>
</$list><br>

Captain Packers

unread,
Mar 13, 2018, 9:57:43 AM3/13/18
to TiddlyWiki
Thanks Jed.

I ended up using this:

<$list filter="[!has[draft.of]tag[Task]!tag[Done]tag[Next]]">
<$checkbox tag="Done"> 
<$link to={{!!title}}><$view field="title"/></$link> - {{!!tags}}<br>
</$checkbox>
</$list><br>

which creates a comma separated tag list.

Captain Packers

unread,
Mar 27, 2018, 11:31:29 AM3/27/18
to TiddlyWiki
Jed,

Is it possible to sort the the tags if I use the {{!!tags}} construct listed below? 

<$list filter="[!has[draft.of]!tag[Done]!tag[@waiting]tag[@next]]">
<$checkbox tag="Done">
<$link to={{!!title}}><$view field="title"/></$link> - {{!!tags}}
<br>
</$checkbox>
</$list>
<br>


On Monday, March 12, 2018 at 10:49:00 AM UTC-4, Jed Carty wrote:

Mark S.

unread,
Mar 27, 2018, 12:34:46 PM3/27/18
to TiddlyWiki
Isn't {{!!tags}} already sorted?

Jed Carty

unread,
Mar 27, 2018, 1:36:42 PM3/27/18
to TiddlyWiki
No, it isn't possible to sort it using {{!!tags}}, when you do that than you get the string stored in the tags field and the sorting works on items in a list, not on the characters in a string. The tags field should be sorted by title, but there may be times, like when you add a new tag, when it isn't sorted. I am not certain that ever happens. But you can't sort it any other way unless you put it in a list.

Captain Packers

unread,
Apr 9, 2018, 4:52:43 PM4/9/18
to TiddlyWiki
Thanks Jed.

The tags within the string referenced by {{!!tags}} do not seem to be sorted. That's what I'd really like to accomplish, but if it's not done by the core then we're talking about writing some code to do it, right? I'm not sure I'm willing to go that far to have a sorted list of tags. I'm just trying to set up a GTD system.

Thanks again for all the feedback.

Jed Carty

unread,
Apr 9, 2018, 5:20:56 PM4/9/18
to TiddlyWiki
If the reason you want to use {{!!tags}} is formatting than you can make a list of tags that is formatted the same way but it is a bit awkward.

In place of {{!!tags}} you can put:

<$list filter='[is[current]tags[]sort[]butlast[]]'><$view field='title'/>,</$list><$list filter='[is[current]tags[]sort[]last[]]'><$view field='title'/></$list>

I just tried this on tiddlywiki.com and I can see why you want that format for the list. It looks much nicer than I expected.

Captain Packers

unread,
Apr 12, 2018, 11:40:30 AM4/12/18
to tiddl...@googlegroups.com
Thanks Jed. Looks great!

That one construct "butlast" cracks me up.

So here's what my final Next Actions Tiddler looks like:

!!!!With Due Date
<$list filter="[tag[@next]!tag[@done]!tag[@waiting]has[due]sort[due]]">
<$checkbox tag="@done"> 
<$link to={{!!title}}><$view field="title"/></$link> ''Due:'' {{!!due}} - ''Tags:'' <$list filter='[is[current]tags[]sort[]butlast[]]'><$view field='title'/>,</$list><$list filter='[is[current]tags[]sort[]last[]]'><$view field='title'/></$list><br>
</$checkbox>
</$list><br>

!!!!No Due Date
<$list filter="[tag[@next]!tag[@done]!tag[@waiting]!has[due]sort[modified]]">
<$checkbox tag="@done"> 
<$link to={{!!title}}><$view field="title"/></$link> ''Modified:'' {{!!modified}} - ''Tags:'' <$list filter='[is[current]tags[]sort[]butlast[]]'><$view field='title'/>,</$list><$list filter='[is[current]tags[]sort[]last[]]'><$view field='title'/></$list><br>
</$checkbox>
</$list><br>

Note: I've added a "due" field to some of my @action tiddlers.
Reply all
Reply to author
Forward
0 new messages