Is it possible to list tiddlers that have one tag, but sort them by a second tag?

58 views
Skip to first unread message

Jeff Vance

unread,
Oct 10, 2018, 12:14:36 PM10/10/18
to TiddlyWiki

I'm not sure if this is possible:  Say I have a bunch of tiddlers tagged "Team Meeting", and each meeting also has a tag for the week that it occurred. What I want is to generate a table of contents that lists all the team meetings, sorted by week.  I kind of prefer to use the tag for sorting rather than creation date because sometimes tiddlers get edited after the fact and the order will change. I want to keep the order that the meetings actually occurred. I suppose I could just create an extra field called "week" to keep in addition to the tag, but I'm already using week tags to track other things so it seems redundant.

I see the table of contents macro has a "sort" parameter, but i can't tell it to sort by tag since there is a mix of tags in that field. Is there a way to define a filter that says to sort only by a certain kind of tag? Maybe based on a regular expression? The week tags all look like this: 2018_ww40.

I appreciate any ideas.

Jeff

Jeff Vance

unread,
Oct 10, 2018, 12:20:12 PM10/10/18
to TiddlyWiki

Actually...I just realized this is a silly question. If I sort by "created" field, the order will always stay the same, even if tiddlers are edited later.  So it shouldn't be a big deal as long a tiddler isn't deleted and created again in the future. 

Still, I'm curious if there is a way to do it by tags in case I need to do something like this in the future.

Mark S.

unread,
Oct 10, 2018, 12:31:16 PM10/10/18
to TiddlyWiki
If you're using the TOC, then I think the answer is "no". But if you're rolling your own, and if the dates have a format that has something in common, then you can use nesting.

<$list filter="[tag[mytag]tags[]prefix[2018]sort[]]" variable=datetag >
<$list filter="[tag<datetag>tag[mytag]sort[]]">
<<currentTiddler>><br/>
</$list>
</$list>

The outer list finds the date tags (which I assume start with 2018) and feeds them to the next list one by one.  The next list just finds tiddlers that match by the original tag and by the date tag.

-- Mark

Mark S.

unread,
Oct 10, 2018, 5:06:02 PM10/10/18
to TiddlyWiki
In the long term, it would be best to make a date field and use that, not tags, for the dates.

-- Mark
Reply all
Reply to author
Forward
0 new messages