Hi Jon,
 

> I'm using Alberto's side-bar search improvement which is a great addition 
> but I'd also like to use the side-bar to search by tags only.
>

Try this:

<$list filter="[tags[]prefix{$:/temp/search}]">
<$transclude tiddler="$:/core/ui/TagTemplate"/> <small class=
"tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
</$list>

If you want a tags only search, create a new tiddler called for instance 
"TagsSearchBox" and paste the following (its just a copy of the sidebar 
search box with the previous code):

<div class="tw-search"><$edit-text tiddler="$:/temp/search" type="search" 
tag="input"/> <$reveal state="$:/temp/search" type="nomatch" 
text=""><$linkcatcher to="$:/temp/search"><$link to="" 
class="btn-invisible">{{$:/core/images/close-button}}</$link></$linkcatcher></$reveal><$reveal
 
state="$:/temp/search" type="match" text=""> &nbsp;<$link 
to="$:/AdvancedSearch" 
class="btn-invisible">&hellip;</$link></$reveal></div>

<$reveal state="$:/temp/search" type="nomatch" text="">

<div class="tw-search-results">

//<small><$count filter="[tags[]search{$:/temp/search}]"/> matches</small>//

<$list filter="[tags[]prefix{$:/temp/search}]">
<$transclude tiddler="$:/core/ui/TagTemplate"/> <small 
class="tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
</$list>

</div>

</$reveal>


And if you want to add the tags search functionality along with the 
(improved) regular one, try with the following:

<$list filter="[tags[]prefix{$:/temp/search}]"><$transclude 
tiddler="$:/core/ui/TagTemplate"/></$list>
<$list filter="[tags[]prefix{$:/temp/search}limit[1]]"><hr></$list>
<$list filter="[prefix{$:/temp/search}] -[tags[]prefix{$:/temp/search}]" 
template="$:/core/ui/ListItemTemplate"/>
<$list filter="[prefix{$:/temp/search}limit[1]]"><hr></$list>
<$list filter="[!is[system]search{$:/temp/search}] 
-[prefix{$:/temp/search}] +[sort[title]limit[250]]" 
template="$:/core/ui/ListItemTemplate"/>

The first <$list> shows the tags matching your search, and the second one 
adds an horizontal rule to separate those results (if there's any) from the 
other ones.
The third <$list> does the improved search but resting the previous results 
(if there's any), and the fourth adds the horizontal rule.
The fifth <$list> does the regular search but resting  the previous results 
(if there's any).

I hope this is helpful,

Alberto

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to