Hi,

On Tuesday, November 17, 2015 at 7:03:53 AM UTC+1, mondayrobot wrote:
>
>
> Use case :I have a list of tiddlers using different tags (A, B, C and D). 
> I want an option to select one or more tags (using  multiple dropdown lists 
> or checkboxes) that will update the list accordingly --> so if I choose 
> tags A and B, it will show me only the tiddlers tagged with A and B ; if I 
> choose the tags A, B and D, it will show me only the tiddlers tagged with 
> A, B and D...
>

Here is an alternative solution to the question discussed in this thread: 

<$list filter="[[$:/temp/tagsforfiltering]indexes[]][[Operator 
Examples]][[all Operator]][[About]]">
<$checkbox tiddler="$:/temp/tagsforfiltering" index=<<currentTiddler>> 
checked=<<currentTiddler>> unchecked=""> <<currentTiddler>></$checkbox>
</$list>


<$button>
<$wikify name="searchterm" text='[<$list 
filter="[[$:/temp/tagsforfiltering]indexes[]]"><$list 
filter="[[$:/temp/tagsforfiltering]getindex<currentTiddler>]" 
variable="tagfound">tag[<<tagfound>>]</$list></$list>]'>
<$action-setfield $tiddler="$:/temp/advancedsearchtagfilter" text=<
<searchterm>>/>
Search
</$wikify>
<$wikify name="tagsforfiltering" text='Tiddlers tagged<$list 
filter="[[$:/temp/tagsforfiltering]indexes[]]"><$list 
filter="[[$:/temp/tagsforfiltering]getindex<currentTiddler>]" 
variable="tagfound">  "<<tagfound>>"</$list></$list>: '>
<$action-setfield $tiddler="$:/temp/advancedsearchtagfilter" 
tagsforfiltering=<<tagsforfiltering>>/>
</$wikify>
</$button> 
<$button>
<$action-deletetiddler $tiddler="$:/temp/tagsforfiltering"/>
<$action-deletetiddler $tiddler="$:/temp/advancedsearchtagfilter"/>
Reset
</$button>


<$reveal type="nomatch" state="$:/temp/advancedsearchtagfilter" text="[]">
{{$:/temp/advancedsearchtagfilter!!tagsforfiltering}}
<$list filter={{$:/temp/advancedsearchtagfilter}} 
template="$:/core/ui/ListItemTemplate"/>
</$reveal>
<$reveal type="match" state="$:/temp/advancedsearchtagfilter" text="[]">
No tags selected.</$reveal> 

All tags from the filter definition in the first line will be displayed 
together with checkboxes. The filter can be modified freely, but please 
keep the first part, [[$:/temp/tagsforfiltering]indexes[]] in place. Please 
note that you always need to hit "Reset" after modifying the filter 
definition in the tiddler.

Please feel free to test and report any bugs!

Cheers,

Stef 

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8d81d760-eaae-4adc-813d-c6e8945a6258%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to