On Sunday, December 13, 2020 at 7:06:02 PM UTC-8 Harry wrote:

> Hi all,
>
> I have two novice questions. The first one is about batch editing tags. I 
> have about 300+ tags now and I want to give them different styles 
> (background color, text color, font size etc.) according to different 
> groups. I have manually created a list of these tags' grouping as a simple 
> search or alphanumerical ordering would not yield the particular result I 
> want. Is there a way that I can create a list of 40 tag names and apply one 
> same style to them in a batch operation?
>

Do these tags exist as actual tiddlers? If so, then I would use Mohammad's 
Tiddler 
Commander <https://kookma.github.io/TW-Commander/> to change color. If you 
create a tiddler like "mytags" and put all the tags in it that you want to 
have a new color, then in the TC filter box you could use a filter like 
"[list[mytags!!tags]] . Add a color field with the #ff0000 value (or 
whatever color you want). 

If all the tags are not tiddlers, then it's a fairly simple batch to create 
them.

I'm not aware of any standard way to change font style and text color of 
tags without hacking the core. But maybe someone else will.
 

>
> My second question is about multilevel sorting. How should I sort the 
> titles by two conditions. Say I want to sort all congressmen by birth year 
> first, and for people born in the same year, I want to order them by death 
> year. I tried tag[congress]sort[birth_year]sort[death_year] but it only 
> return the result sorted by the last variable death_year. 
>
>
Using 5.1.23 prerelease, you can make a filter similar to this example:

<$vars mysort="[get[birth-year]addsuffix{!!death-year}]">
<<list-links "[tag[congress]sortsub<mysort>]">>
</$vars>

This uses the new sortsub operator. The *mysort* filter for the sortsub 
operator has to be defined in the surrounding variables. The *sortsub* puts 
the birth-year and death-year together, and then uses that to sort by. I 
hope ;-)



>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b3ffecc3-7757-4fe0-9718-cc15ea351acen%40googlegroups.com.

Reply via email to