Lists of Tiddlers using Multiple Tags | TiddlyWiki

One of my big reasons for enjoying to use TiddlyWiki is creating lists based on tags, but as I have used it, the lists sometimes get longer and have made me start to question how I was using it as some of my lists have grown exceptionally long and I should, perhaps, improve how I am tagging my Tiddlers to improve my sorting results. I use TiddlyWiki, primarily, as a quick and efficient method of performing a kind of “brain-dump” to hold information and allow me to easily pick back up where I left off.

In short, I wanted to be able to better sort my tiddlers based on multiple tags and I couldn’t find an easy way to do it that was well explained. It seems as though most people that use TiddlyWiki communicate at a higher technical level than my little monkey-brain can easily decipher. So, after some searching and testing, here is the knowledge I have gained that will hopefully allow you to improve your usage of TiddlyWiki.

There were no examples in the default TiddlyWiki. There were some instruction on using the “Table-of-Contents” macro but nothing that would explain how to sort it by multiple tags.

The simple example given was straight forward. I am not going to pretend like I completely know what I am doing but I do understand this.

<dev class="tc-table-of-contents">
<toc "Contents">>

The key here is the second line. Here is where you have your options. “toc” is the simple style for a table of contents which is, for my purposes, “perfect.” For other styles. see the previously referenced link as that is not what mattered in this case. “Contents” is the tag that will be listed. So, all Tiddlers containing the tag “Contents” will be displayed. Very straight forward.

Now the part that was a bit tricky for me. Here is where I imagine the TiddlyWiki experts are laughing at my ignorance and I accept that. Lets say, I wanted to sort out all the Tiddlers tagged with “Linux” and “VideoGames.” I would enter this:

<dev class="tc-table-of-contents">
<<toc 'Linux' sort:"tag[VideoGames]">>

Lets say I wanted to go another step further and all the Tiddlers with “Linux” and “VideoGames” but with another tag like the year I created it. Since I happen to tag Tiddlers by year, I can easily add that by adding “tag[2021]” or whatever date to the 2nd line like this.

<dev class="tc-table-of-contents">
<<toc 'Linux' sort:"tag[VideoGames]tag[2021]">>

I could continue to add other qualifiers to my list but at this point, as much as necessary.

Other Tags I may want create more focused lists would be my project ideas that have to do with Arduino, journal entries or anything dealing with “openSUSE,”, “Commodore” or “VintageComputers.” From what I can tell, at least the way I am currently using this function. I don’t have to put things in any particular order. I do seem to get an alphabetical listing from this as well.

Insert Preconfigured Snippet

Rather than remember how to type this all out or worse, have to visit some website or copy and paste, you can create a preconfigured snippets of text by selecting Add your own.

Call it whatever you like, I am choosing to call it, Multi-Tag Tiddler List as that is essentially what it is. Note that it will automatically fill in the necessary tag name and also be sure to set the caption at the bottom to what you want for the menu entry.

Replace the “SOMETHING, SOMETHING_ELSE and ANOTHER_THING as necessary.

 <div class="tc-table-of-contents">

I’m sure I could do something a bit more clever for the “fill-in-with-your-tags” portion but this works for me. Just by reading it, I will know what I have to do. I also know that if I only need to filter by two tags, I can just remove the last “tag[ANOTHER_THING]“. Using the “Preconfigured Snippet” is an incredibly easy way to add functionality to TiddlyWiki as tis will make using this feature much, much quicker and easier.

Final Thoughts

This is just another great way that TiddlyWiki is very scalable and can be used as a method to keep yourself organized. I have many uses for creating lists from Tiddlers like this and I am further inspired to see how else I can make this brain-dump tool even more useful. If you want to know some of the ways I use TiddlyWiki and how I have configured it, you can review that here.

TiddlyWiki | Personal, non-linear, Note Taking Application on Linux

2 thoughts on “Lists of Tiddlers using Multiple Tags | TiddlyWiki

Leave a Reply