[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-16 Thread Odin Jorna
Hi mat!

I managed to get it to work.  I made a tiddler tagged, $:/tags/ViewTemplate and 
used your code. I added a `list-after` field with 
`$:/core/ui/ViewTemplage/body, so the tags show up underneath the text of 
the tiddler. 

<$set name=curr value=<>>
{{{ [all[current]tags[]color[#ffeedd]] || $:/core/ui/TagTemplate }}}



Then I modified the `$:/core/ui/ViewTemplate/tags` tiddler so it shows all 
the tags without the #ffeedd color. In bold is what I added.

<$reveal type="nomatch" stateTitle=<> text="hide" tag="div" 
retain="yes" animate="yes">
<$list 
filter="[all[current]tags[]*!color[#ffeedd]*sort[title]]" 
template="$:/core/ui/TagTemplate" storyview="pop"/>


This did the trick! The normal tagline above a tiddler doesn't show any 
tags with the color #ffeedd.

Thanks a lot for your help and patience with me :-)

Op vrijdag 15 mei 2020 20:25:57 UTC+2 schreef Mat:
>
> Sorry, my mistake. 
> OK, I get this to work on tiddlywiki.com
>
> {{{ [all[current]tags[]color[#ffeedd]] || $:/core/ui/TagTemplate }}}
>
> If it doesn't work for you, pleaes try it on tiddlywiki.com and see if it 
> works there.
>
> Just to make sure I didn't misunderstand: It shows the current tiddlers 
> tags that are of the specified colour.
>
> <:-)
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/42851b4f-b40e-428a-8a56-ffce198e67d8%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-15 Thread TonyM
Odin

I had a thought rather than list by color why not tag your tags with a group 
tag, then create a button to set tag tiddlers so tagged to the colour for that 
group.

Subsequent list filters use the more meaning full tag group tags.

Regards
Tony

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5f02ccba-e7d7-4504-99ef-968735a7c17e%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-15 Thread Mat
Sorry, my mistake. 
OK, I get this to work on tiddlywiki.com

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

If it doesn't work for you, pleaes try it on tiddlywiki.com and see if it 
works there.

Just to make sure I didn't misunderstand: It shows the current tiddlers 
tags that are of the specified colour.

<:-)

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0a9f4f37-5b48-444b-90d7-ceec71e5519c%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-15 Thread Odin Jorna
Hey, thanks for replying! I tried your snippet, but unfortunately, it 
creates a new tag with the title of the current tittler instead of listing 
the tiddlers. See pictures.

Op vrijdag 15 mei 2020 16:19:49 UTC+2 schreef Mat:
>
> Hm, I misled you in my previous attempt at a viewtemplate, i.e this
>
> [all[current]tags[]field:color[#ffeedd]]
>
> ...only takes the current tiddlers tags and, of these, which ones have the 
> color. Thus, the output is the tags, not the current tiddler title.
> Instead, for a conditional viewtemplate I think you can do this
>
> <$set name=curr value=<>>
> {{{ [all[current]tags[]field:color[#ffeedd]tagging[]match] || 
> $:/core/ui/TagTemplate }}}
> 
>
>
> <:-)
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/344af686-4b6b-4385-bcdd-7fff831f9f4b%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-15 Thread Mat
Hm, I misled you in my previous attempt at a viewtemplate, i.e this

[all[current]tags[]field:color[#ffeedd]]

...only takes the current tiddlers tags and, of these, which ones have the 
color. Thus, the output is the tags, not the current tiddler title.
Instead, for a conditional viewtemplate I think you can do this

<$set name=curr value=<>>
{{{ [all[current]tags[]field:color[#ffeedd]tagging[]match] || 
$:/core/ui/TagTemplate }}}



<:-)

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7dd78ece-7fc3-4fad-bdc0-19bbfb8fc883%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-15 Thread Odin Jorna
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]]">  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 }}}
> 


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;}
> 
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/eec7838f-b959-42c4-9c5d-e59241dd0c7f%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-14 Thread Odin Jorna
Thank you both for the ideas!  And the detailed explanations. I am going to 
try them out tomorrow :)

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;}
> 
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fc896928-d270-490c-87ce-690668911e7e%40googlegroups.com.


[tw5] Re: [Question] Filtering tags based on their colour code.

2020-05-14 Thread 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;}


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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9c9dc5f7-2189-4e85-ae3c-e102f1afe3f6%40googlegroups.com.