\define thisMakeList()
<$list filter='[all[]$(Tag1)$$(Tag2)$$(Tag3)$$(Tag4)$]'>
</$list>
\end
List of tags:
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag1_field checked='tag[HelloThere]' unchecked=''>tag1</$checkbox>
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag2_field checked='tag[Examples]' unchecked=''>tag2</$checkbox>
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag3_field checked='tag[tag3]' unchecked=''>tag3</$checkbox>
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag4_field checked='tag[tag4]' unchecked=''>tag4</$checkbox>
Results:
<$vars Tag1={{$:/state/Selected Tiddlers!!tag1_field}} Tag2={{$:/state/Selected Tiddlers!!tag2_field}} Tag3={{$:/state/Selected Tiddlers!!tag3_field}} Tag4={{$:/state/Selected Tiddlers!!tag4_field}}>
<<thisMakeList>>
</$vars>
On 17 Nov 2015, at 13:27, Tobias Beer <beert...@gmail.com> wrote:
Hi again,I looked into the list widget and figured that 5.1.10-prerelease does have the required refresh handling.So, I updated the example on at the join-filter demo and added a button to quickly reset the selected tags.Works nicely. ;-)
Best wishes,— tb--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/db272711-f2d8-4aaf-8e73-ed0f18b92a6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Best wishes
Do you guys know if it's possible to make an option to update a filter visually (selecting from a dropdown list or using checkboxes or something similar)?
Do you guys know if it's possible to Is it possible to make an option to update a filter visually (selecting from a dropdown list or using checkboxes or something similar)?
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...
\define thisMakeList()
<$list filter='[all[]$(Tag1)$$(Tag2)$$(Tag3)$$(Tag4)$]'>
</$list>
\end
List of tags:
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag1_field checked='tag[HelloThere]' unchecked=''>tag1</$checkbox>
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag2_field checked='tag[Examples]' unchecked=''>tag2</$checkbox>
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag3_field checked='tag[tag3]' unchecked=''>tag3</$checkbox>
<$checkbox tiddler='$:/state/Selected Tiddlers' field=tag4_field checked='tag[tag4]' unchecked=''>tag4</$checkbox>
Results:
<$vars Tag1={{$:/state/Selected Tiddlers!!tag1_field}} Tag2={{$:/state/Selected Tiddlers!!tag2_field}} Tag3={{$:/state/Selected Tiddlers!!tag3_field}} Tag4={{$:/state/Selected Tiddlers!!tag4_field}}>
<<thisMakeList>>
</$vars>
Choosed Tags:
<$list filter="[tag[Searchtest]]">
{{!!tag1_field}} {{!!tag2_field}} {{!!tag3_field}} {{!!tag4_field}} {{!!tag5_field}}
</$list>
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...
<$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>
<$reveal type="nomatch" state="$:/state/SampleReveal1" text="show">
<$button set="$:/state/SampleReveal1" setTo="show">Show group A & B</$button>
</$reveal>
<$reveal type="match" state="$:/state/SampleReveal1" text="show">
<$button set="$:/state/SampleReveal1" setTo="hide">Hide group A & B</$button>
<$list filter="[[$:/temp/tagsforfiltering][A]][[B]]">
<$checkbox tiddler="$:/temp/tagsforfiltering" index=<
<currentTiddler>> checked=<<currentTiddler>> unchecked=""> <<currentTiddler>></$checkbox>
</$list>
</$reveal>
<$reveal type="nomatch" state="$:/state/SampleReveal2" text="show">
<$button set="$:/state/SampleReveal2" setTo="show">Show group C</$button>
</$reveal>
<$reveal type="match" state="$:/state/SampleReveal2" text="show">
<$button set="$:/state/SampleReveal2" setTo="hide">Hide group C</$button>
<$list filter="[[$:/temp/tagsforfiltering][C]]">
<$checkbox tiddler="$:/temp/tagsforfiltering" index=<
<currentTiddler>> checked=<<currentTiddler>> unchecked=""> <<currentTiddler>></$checkbox>
</$list>
</$reveal>
<$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 with<$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><br/><br/><br/>
<$button>Open ''ALL found'' Tiddlers
<$list filter={{$:/temp/advancedsearchtagfilter}}>
<$action-navigate $to=<<currentTiddler>> $scroll=no/>
</$list>
</$button>
Matching Tiddlers:
<$count filter={{$:/temp/advancedsearchtagfilter}} template="$:/core/ui/ListItemTemplate"/>
<$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>
\define addPrefix() +[tag[
\define addSuffix() ]]
\define finalFilter() [all[tiddlers]] $(myfilter2)$ +[regexp[$(additionalCriteria)$]]
<$macrocall
$name="toc-tabbed-internal-nav"
tag="TableOfContents"
selectedTiddler="$:/temp/toc/selectedTiddler"
unselectedText="<p>Select a topic in the table of contents. Click the arrow to expand a topic.</p>"
missingText="<p>Missing tiddler.</p>"
template="CheckboxTemplate"
/>
<$edit-text tiddler=additionalCriteria tag=input size=20 /><p/>
<$vars additionalCriteria={{additionalCriteria}}>
<$set filter="[field:criteria[yes]addprefix<addPrefix>addsuffix<addSuffix>]" name=myfilter>
<$wikify text=<<myfilter>> name=myfilter2 type=text>
Choosed Tags: <$list filter="[field:criteria[yes]]" storyview="pop"><$set name="backgroundColor" value={{!!color}}><span style=<<tag-pill-styles>> class="tc-tag-label">
<$view field="title" format="text" />
<$button message="tm-remove-tag" param={{!!title}} class="tc-btn-invisible tc-remove-tag-button">×</$button></span>
</$set>
</$list>
<div style="display:inline;"><<show-system>></div>
<$button>Open ''ALL found'' Tiddlers
<$list filter=<<finalFilter>>>
<$action-navigate $to=<<currentTiddler>> $scroll=no/>
</$list>
</$button>
<$count filter=<<finalFilter>> /> matching tiddler:
<$macrocall $name=list-links filter=<<finalFilter>> />
</$wikify>
</$set>
</$vars>
Hi,
maybe the additional filter could be possible with the additional criteria, like Mark wrote it in his solution?
But I couldn't manage to put it in the right place of Stef's solution, to bring it to work.
Here is the full command from Mark's search-solution by multiple tags with an additional filter (already modified by me to have a count and to show the choosen tags as their tag-labels):