On Wednesday, July 1, 2020 at 4:30:08 AM UTC-7, Jake wrote:
>
> PS. But btw what to do if the category name is located not in a special 
> field but is just one of the tags? And there are several those tags of 
> course. So tiddler can have: "Type1 Category3" tags or "Type4 Category1" 
> etc. Is there a way to "get" those?
>

In my previous reply, I suggested that something like this might work:
{{{ [<currentTiddler>tags[]prefix[Category]addsuffix[-icon]] }}}

Of course, this assumes that there is only one category tag per tiddler, 
and that all the category names start with "Category".  However, if your 
category names can be any text (e.g., "Games", "Books", "Music", etc.), 
then you will need another way to identify which tag is actually the 
"category tag".  One way would be to create tiddlers for each of those 
category names, and then tag *those* tiddlers with "Category".

Then you could write:
{{{ [<currentTiddler>tags[]tag[Category]addsuffix[-icon]] }}}

In other words:
"for the current tiddler, get it's tags, then select only tags are 
themselves tagged with "Category" and add the "-icon" suffix to that tag 
name

This still assumes that there's only one category tag on each tiddler, but 
at least the names of those tags can be anything you like.

enjoy,
-e

-- 
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/c7ce5c94-440b-494e-901d-1eba0fd039abo%40googlegroups.com.

Reply via email to