Any way to hack the filter for sidebar search?

55 views
Skip to first unread message

David Gifford

unread,
Sep 20, 2020, 2:17:44 PM9/20/20
to TiddlyWiki
Hi all

I am experimenting with missing tiddlers. I have a "list-search" list that includes missing tiddlers, and I hacked the sidebar tabs > more > all to show missing tiddlers in addition to actual tiddlers. They show up in two different colors.

If I can, I would like to have the non-advanced sidebar search results to include missing tiddlers. I tried adding this filter ([all[missing+tiddlers]!is[system]!is[shadow]sort[title]]) to replace the filter in $:/core/ui/SideBarSegments/search. But that did not work.

Any better ideas?

And yes, I know I need to do it in a way that avoids hacking core tiddlers. I am just in the experimental phase and can figure out how to do it to avoid that. I just want to see if it can be done first.

Thanks for any help you can give me. Blessings.

Mark S.

unread,
Sep 20, 2020, 3:31:41 PM9/20/20
to TiddlyWiki
I think you want to hack

$:/core/ui/DefaultSearchResultList

I hacked like this to include missing tiddlers

\define searchResultList()
//<small>{{$:/language/Search/Matches/Title}}</small>//

<$list filter="[all[tiddlers+missing]!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>

//<small>{{$:/language/Search/Matches/All}}</small>//

<$list filter="[all[tiddlers+missing]!is[system]search{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>

\end
<<searchResultList>>

David Gifford

unread,
Sep 20, 2020, 6:47:18 PM9/20/20
to TiddlyWiki
That did the trick, Mark! Thank you!
Reply all
Reply to author
Forward
0 new messages