Hello,
I have a great multiple-Tag-Search, made with the help of Stef.
Now I would like to integrate in this an additional parameter to search by,
means:
I made a
Search by text in tiddlers:
<$edit-text tiddler="$:/temp/advancedsearchtagfilter" field="textinhalt"
size=60/><br/>
<$set name="tiddlertextinhalt"
value={{$:/temp/advancedsearchtagfilter!!textinhalt}}>
{{<<list-links "[regexp:text<tiddlertextinhalt>]">>}}
</$set>
This works in a standalone tiddler.
In this field I want to write words, for which a I want to search for in
the text of tiddlers.
Additionally I want to filter these founded tiddlers by multiple tags. So
it must be integrated somehow in the MultipleTagSearch by Stef. My idea is
by transclusion.
You can see it and play with it here:
http://suryas-testwiki.tiddlyspot.com/#MultipleTagSearch%20by%20Stef
The code if it is:
<$reveal type="nomatch" state="$:/state/SampleReveal1" text="show">
<$button set="$:/state/SampleReveal1" setTo="show">Show group
"Character"</$button>
</$reveal>
<$reveal type="match" state="$:/state/SampleReveal1" text="show">
<$button set="$:/state/SampleReveal1" setTo="hide">Hide group
"Character"</$button>
<$list filter="[[$:/temp/tagsforfiltering][A]][[B]][[C]][[D]][[E]]">
<$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 "New
Character"</$button>
</$reveal>
<$reveal type="match" state="$:/state/SampleReveal2" text="show">
<$button set="$:/state/SampleReveal2" setTo="hide">Hide group "New
Character"</$button>
<$list filter="[[$:/temp/tagsforfiltering][A:Anewcharacter]]
[[B:Anewcharacter]][[C:Anewcharacter]][[D:Anewcharacter]][[E:Anewcharacter]][[F:Anewcharacter]][[G:Anewcharacter]][[H:Anewcharacter]][[I:Anewcharacter]]">
<$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/>
Matching Tiddlers:
<$count filter={{$:/temp/advancedsearchtagfilter}}
template="$:/core/ui/ListItemTemplate"/>
<$button>Open ''ALL found'' Tiddlers
<$list filter={{$:/temp/advancedsearchtagfilter}}>
<$action-navigate $to=<<currentTiddler>> $scroll=no/>
</$list>
</$button>
<$reveal type="nomatch" state="$:/temp/advancedsearchtagfilter" text="[]">
{{$:/temp/advancedsearchtagfilter!!tagsforfiltering}}
<$list filter={{$:/temp/advancedsearchtagfilter}}
template="$:/core/ui/ListItemTemplate 2"/>
</$reveal>
<$reveal type="match" state="$:/temp/advancedsearchtagfilter" text="[]">
No tags selected.</$reveal>
I tried it with this, but I cannot get it to work. The result is always
with too many [] or with them at the wrong positions.
So, what am I doing wrong?
<$button>
<$wikify name="searchterm" text='[<$list
filter="[[$:/temp/tagsforfiltering]indexes[]]"><$list
filter="[[$:/temp/tagsforfiltering]getindex<currentTiddler>]"
variable="tagfound">tag[<<tagfound>
>]</$list></$list>]{{$:/temp/advancedsearchtagfilter!!ratingfilter}}[regexp:text
<tiddlertextinhalt>]'>
<$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>
Thanks for your help!
Surya
--
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/ee7de340-a938-49c0-a1c4-8de9d3860595%40googlegroups.com.