Hi Mat,

I tried fiddling with the examples you showed. I am afriad of tagging each 
tags, when I have a lot of them. So it becomes a lot of work. So I was a 
bit stubborn and tried filtering on fields.

I changed your snippet of code to this:

 {{{ [all[current]tags[]field:color[#ffeedd]] || $:/core/ui/TagTemplate }}}


which works!  It creates a list of only the tags with that colour 
underneath every tiddler. Now I want to add a conditionality, so that this 
list only appears IF I have tags the tiddler with a tag of this colour. I 
had used this snippet of code before to only add a template to a tiddler if 
it was tagged with the tag 'person'. <$list 
filter="[all[current]tag[Person]]"> </$list> So I tried modifying it for 
this case as well:

> <$list filter="[all[current]tags[]field:color[#ffeedd]]">
> see also: {{{ [all[current]tags[]field:color[#ffeedd]] || 
> $:/core/ui/TagTemplate }}}
> </$list>


But then it doesn't work. I think I am not using the right code for this? 
Or is the filters not made for fields? Maybe someone knows how to add this 
conditionality.

Secondly, I tried your last snippet of code to filter a type of tag from 
the tag list. But also couldn't manage to make it work, probably because it 
changed it to filter on the color fields. 

Attached a picture, showing what I am envisioning. I feel like I am close, 
but not quite there yet.

Anyways, I hope I am asking not too much from the people on the forum, but 
any help is appreciated.

Kind regards,
Odin

Op donderdag 14 mei 2020 20:09:38 UTC+2 schreef Mat:
>
> Another approach:
>
> First, create "super tags", i.e have your tags be tiddlers that are in 
> turn categorized by using tags. For example your red tags might be: tomato, 
> strawberry and cherry and your green tags might be broccoli, cucumber, 
> avocado. So you let all six of those tags be tiddlers which you in turn tag 
> with "red" and "green" respectively.
>
> To "make a list of all tags of the current tiddler that aren't red" you'd 
> use
>
> {{{ [all[current]tags[]!tag[red]] }}}
>
> To "view a tiddler (not editing), hiding all green tags but keeping red 
> tags visible" is possible but there's some kind of silent concensus that it 
> is a bad idea to hide tags. If you still want to do it, here's a strategy:
>
> Create a new viewtemplate (i.e tagged $:/tags/ViewTemplate) that contains
>
> {{{ [all[current]tags[]tag[red]] || $:/core/ui/TagTemplate }}}
>
> this creates a new row with only the red tags. (You can click the 
> $:/tags/ViewTemplate pill to reorder so that it is positioned where tags 
> are supposed to be positioned). The problem is that you'll get this applied 
> for all tiddlers so you might want to add a criteria to the current 
> tiddler, e.g that is is by itself tagged red, like so:
>
> {{{ [all[current]tag[red]tags[]tag[red]] || $:/core/ui/TagTemplate }}}
>
> You can do the equivalent for green.
>
> Likely you'll want the original tags viewtemplate to be hidden. For this 
> you can style the tiddlers that contain any of your cucumber, tomato etc 
> tags so that they hide the original tags row:
>
> <$list filter="[tag[red]] [tag[green]]">
> [data-tags*="{{!!title}}"] .tc-tags-wrapper {display:none;}
> </$list>
>
> OK, the above is untested but I think it should give the idea.
>
> <:-)
>

-- 
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/eec7838f-b959-42c4-9c5d-e59241dd0c7f%40googlegroups.com.

Reply via email to