List all tags in a tiddler

I have seen guides on listing tiddlers with a certain tag. Also, I know how to list a tag. Is there a way to list all tags? For a certain TiddlyWiki I hope to use the same 10 or so tags and stick with those. Almost like categories. Then I want to put them in the default tiddler. This way when people visit, they see the tags that make up this public wiki right at the top.

Since I do plan on sticking with 10 or so, I could just list them out. I suppose that’s easy enough. But I thought if there’s a single line of code I could use to list them all at once, that might be better.

Finally, on a related note. Is this on the roadmap? Click a tag and all the tiddlers for that tag load. Versus the pop up listing them.

Hi, In the right sidebar click the More : Tags tabs.

It’s also possible to drag and drop the tag-pill into the open area in the right sidebar

OpenTags-1

2 Likes

First, create a tiddler containing:

<$list filter="[tags[]]">
   <$macrocall $name="tag" tag=<<currentTiddler>>/>
</$list>

Then, add the name of that tiddler at the beginning of $:/DefaultTiddlers

Note that, if there are some tags that you don’t want listed, you can specifically exclude them from the filter, like this:

<$list filter="[tags[]] -[[tagA]] -[[tagB]]">
   <$macrocall $name="tag" tag=<<currentTiddler>>/>
</$list>

(i.e., show all tags except for “tagA” and “tagB”)

Also, if you want to ALWAYS show the list of tags at the top of the story column, without them appearing inside a tiddler frame, then instead of adding the tiddler to $:/DefaultTiddlers, you can tag it with $:/tags/AboveStory. Of course, you’d also want to exclude $:/tags/AboveStory from the list, like this:

<$list filter="[tags[]] -[[$:/tags/AboveStory]]">
   <$macrocall $name="tag" tag=<<currentTiddler>>/>
</$list>

enjoy,
-e

4 Likes

G’day feedthegood,

Your post got me feeling like geeking out on TW a little.

Check this out to see if anything in there is of any use to you: Tag Cloud (TiddlyWiki coding fun)

If you like the idea of a cloud but mine isn’t your cup of tea, do a web search for "TiddlyWiki" "tag" "cloud" (or maybe something like "TiddlyWiki" "word" "cloud" etc.

1 Like

This is even better than what I was thinking. Thank you!

I just realized that this can be even more succinct because the <<tag>> macro defaults to the currentTiddler. Thus, we can skip the <$macrocall .../> syntax and just use <<tag>>, like this:

<$list filter="[tags[]] -[[$:/tags/AboveStory]]"><<tag>></$list>
1 Like