Mark,
So I took your suggestion and lifted the code from the macro into my own
TiddlyWiki, and ended up with this:
<div class="tc-sidebar-lists">
<$set name="searchTiddler" value="$:/temp/searchjournal">
<div class="tc-search">
<$edit-text tiddler="$:/temp/searchjournal" type="search" tag="input"
focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify
"$:/state/popup/search-dropdown">> class="tc-popup-handle"/>
<$reveal state="$:/temp/searchjournal" type="nomatch" text="">
<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}}
aria-label={{$:/language/Buttons/AdvancedSearch/Caption}}
class="tc-btn-invisible">
<$action-setfield $tiddler="$:/temp/advancedsearch"
text={{$:/temp/searchjournal}}/>
<$action-setfield $tiddler="$:/temp/searchjournal" text=""/>
<$action-navigate $to="$:/AdvancedSearch"/>
{{$:/core/images/advanced-search-button}}
</$button>
<$button class="tc-btn-invisible">
<$action-setfield $tiddler="$:/temp/searchjournal" text="" />
{{$:/core/images/close-button}}
</$button>
<$button popup=<<qualify "$:/state/popup/search-dropdown">>
class="tc-btn-invisible">
{{$:/core/images/down-arrow}}
<$list
filter="[{$:/temp/searchjournal}minlength{$:/config/Search/MinLength}limit[1]]"
variable="listItem">
<$set name="resultCount" value="""<$count
filter="[!is[system]search{$(searchTiddler)$}]"/>""">
{{$:/language/Search/Matches}}
</$set>
</$list>
</$button>
</$reveal>
<$reveal state="$:/temp/searchjournal" type="match" text="">
<$button to="$:/AdvancedSearch"
tooltip={{$:/language/Buttons/AdvancedSearch/Hint}}
aria-label={{$:/language/Buttons/AdvancedSearch/Caption}}
class="tc-btn-invisible">
{{$:/core/images/advanced-search-button}}
</$button>
</$reveal>
</div>
<$reveal tag="div" class="tc-block-dropdown-wrapper"
state="$:/temp/searchjournal" type="nomatch" text="">
<$reveal tag="div" class="tc-block-dropdown tc-search-drop-down
tc-popup-handle" state=<<qualify "$:/state/popup/search-dropdown">>
type="nomatch" text="" default="">
<$list
filter="[{$:/temp/searchjournal}minlength{$:/config/Search/MinLength}limit[1]]"
emptyMessage="""<div class="tc-search-results">
{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
{{$:/core/ui/DefaultSearchResultListDate}}
</$list>
</$reveal>
</$reveal>
</$set>
</div>
As you can see, I named my clone of the results
list $:/core/ui/DefaultSearchResultListDate.
I now have a search bar that sorts its results by date created.
*But...*
Now when I type a term into the original search bar on the right, the
results are shown with two tabs at the top. Both are named "List". The
first tab sorts the results by title, as they have always been. When I
click on the second List tab, the results are sorted by date created.
Did I enable sortable search results the moment I created the tiddler
$:/core/ui/DefaultSearchResultListDate?
Thank you.
--
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/bc95bfdf-f28e-4f19-a3d1-c35074500bd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.