[TW5] How to show tiddlers with a special tag, grouped by tag and sorted by tagname?

230 views
Skip to first unread message

Uwe

unread,
Mar 5, 2015, 3:18:14 PM3/5/15
to tiddl...@googlegroups.com
At the right side of Tiddlywiki under "More"->"Tags" I see a list of coloured tags (see attachment). How can I get the code of this list? I would like to show the tags in a new tiddler, but with an additional filter: "Show only the ordered tags of tiddlers, that have also the tag "Content" ". To show also the number of tiddlers with the different tags (as shown in the screenshot) would be nice.

As an alternative solution it would be helpful to have a list of tiddlers filtered by the tag "Content", sorted by tag and tiddlername with the different tags as the headlines. The tiddlers should be links.

tagA

1. [Tiddler01]
2. [Tiddler02]
3. [Tiddler03]

tagB

1. [Tiddler01]
2. [Tiddler02]
3. [Tiddler45]

tagC

1. [Tiddler01]
2. [Tiddler33]
3. [Tiddler45]
4. [Tiddler55]

...

Thanks for any help.

Greetings,

Uwe
tags with numbers.png

Patrick Detzner

unread,
Mar 5, 2015, 4:31:20 PM3/5/15
to tiddl...@googlegroups.com
Hi Uwe,

You can find the code in the shadow tiddler $:/core/ui/MoreSideBar/Tags. In general, you can find the code to any pre-loaded TW features if you look around in the shadow tiddlers.

To show only the tags of tiddlers that are tagged "Content," with all the other features of the More->Tags sidebar, try this:

<$list filter="[tag[Content]tags[]sort[title]]">
<$transclude tiddler="$:/core/ui/TagTemplate"/>
<small class="tc-menu-list-count"><$count filter="[all[current]tagging[]]"/><br></small>
</$list>

Let me know if that works. You can read more about filters and filter operators at tiddlywiki.com. They definitely take some getting used to but they are very powerful.

Patrick

Eric Shulman

unread,
Mar 5, 2015, 4:32:56 PM3/5/15
to tiddl...@googlegroups.com
On Thursday, March 5, 2015 at 12:18:14 PM UTC-8, Uwe wrote:
At the right side of Tiddlywiki under "More"->"Tags" I see a list of coloured tags (see attachment). How can I get the code of this list?
I would like to show the tags in a new tiddler, but with an additional filter: "Show only the ordered tags of tiddlers, that have also the tag "Content" ". To show also the number of tiddlers with the different tags (as shown in the screenshot) would be nice.
As an alternative solution it would be helpful to have a list of tiddlers filtered by the tag "Content", sorted by tag and tiddlername with the different tags as the headlines. The tiddlers should be links.

The following is not a complete solution, but should get you on your way...

Take a look at [[$:/core/ui/MoreSideBar/Tags]].  You will find these lines that generate the tag pill list output:
<$list filter="[tags[]!is[system]sort[title]]">
<$transclude tiddler="$:/core/ui/TagTemplate"/>
<small class="tc-menu-list-count"><$count filter="[all[current]tagging[]]"/></small>
</$list>
First, copy this into a separate tiddler, so you will get just the list without the "tag manager" button above, or the "untagged" items below.  Then, modify the filter in the <$list> widget to suit your needs.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

"Inside TiddlyWiki: The Missing Manual"

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

Uwe

unread,
Mar 5, 2015, 5:07:37 PM3/5/15
to tiddl...@googlegroups.com
Thank you, both; that "wordcloud" helped to solve the problem!

Is there also a solution for an alphabetical ordered list? (So the user can see the content at first sight, without clicking around.)

Thanks again

Greetings,

Uwe

Jed Carty

unread,
Mar 5, 2015, 5:10:26 PM3/5/15
to tiddl...@googlegroups.com

Jon

unread,
Mar 5, 2015, 5:33:58 PM3/5/15
to tiddl...@googlegroups.com
Hi Jed,

That looks great and I'd really appreciate it in my wiki but I couldn't get it going. I copied and pasted into a tiddler but the the 2nd "(All Results)" box doesn't show up and it doesn't show my tags. Does it rely on something else?

Thanks
Jon

Jed Carty

unread,
Mar 5, 2015, 6:21:01 PM3/5/15
to tiddl...@googlegroups.com
Yes, that is specific to the bookmarks I am using. It only displays tags that are listed in the $:/data/Bookmarks/BookmarkTags tiddler, and then under each tag it only displays things that have both that tag and the tag Bookmark, the second and third tag selection dropdowns only show up when the first (and then second for the third one) menu has an option selected. That implementation is almost certainly much more complex than what you are describing.

this:

<$list filter='[!is[system]tags[]]'>
<$transclude tiddler="$:/core/ui/TagTemplate" mode="inline"/>

<$set name=CurrentTag value=<<currentTiddler>>>
<$list filter='[tag<CurrentTag>]'>

<$link to=<<currentTiddler>>><$view field='title'/></$link>

</$list>
</$set>
</$list>

may do what you want, just change the !is[system] part to whatever filter you want. So to only show tags that come from tiddlers that are tagged Contents you make the first line <$list filter='[tag[Contents]tags[]]'>

Jon

unread,
Mar 6, 2015, 1:15:49 AM3/6/15
to tiddl...@googlegroups.com
OK, thanks Jed. I'll play around with that.

Regards
Jon
Reply all
Reply to author
Forward
0 new messages