[TW5] Hide image tiddlers fitles from search

250 views
Skip to first unread message

Shaked Pesach

unread,
Jan 10, 2018, 3:28:59 PM1/10/18
to TiddlyWiki
Hi,

I can't be the first one to deal with it, but i couldn't find anything on it so i'm asking here:
Is there a way to hide certain tiddlers from search?

I'm adding a lot of images tiddlers and it really messing up my search reaults... if i could hide all the images tiddlers type or add some custom tag to all the tiddlers i don't want to show in search reault, that will be great

Diego Mesa

unread,
Jan 10, 2018, 3:37:40 PM1/10/18
to TiddlyWiki
Hello SP,

Tiddlers with names that start with $:/ are hidden from search and classified "system" tiddlers.

I place all of my stylesheets, images, etc. under:

$:/.dm/images/.....
$:/.dm/styles/....
etc...

ste...@gmail.com

unread,
Jan 10, 2018, 5:38:13 PM1/10/18
to TiddlyWiki
Hi,


On Wednesday, January 10, 2018 at 9:28:59 PM UTC+1, Shaked Pesach wrote:

I'm adding a lot of images tiddlers and it really messing up my search reaults... if i could hide all the images tiddlers type or add some custom tag to all the tiddlers i don't want to show in search reault, that will be great


You could try a filter in the "Advanced Search/Filter" tab, e.g.:

[search[Jack]!type[image/jpeg]]

This will find all tiddlers containing "Jack" in https://tiddlywiki.com/, except the tiddler "Motovun Jack.jpg" (because it's type is "image/jpeg").

Cheers,

Stef

Shaked Pesach

unread,
Jan 11, 2018, 1:00:40 AM1/11/18
to TiddlyWiki


בתאריך יום רביעי, 10 בינואר 2018 בשעה 22:37:40 UTC+2, מאת Diego Mesa:
Diego, thank you for this solution.
If only i knew it in first place... now i have to change all my picture tiddler and also change all the other tiddler that links to them.
I still hope to find a solution which doesn't include changing tiddler names. 

Shaked Pesach

unread,
Jan 11, 2018, 1:01:18 AM1/11/18
to TiddlyWiki


בתאריך יום חמישי, 11 בינואר 2018 בשעה 00:38:13 UTC+2, מאת ste...@gmail.com:
Stef, i'm rather not using the advanced search. I'm looking for a way to filter the quick search, directly from main page. 

Shaked Pesach

unread,
Jan 11, 2018, 3:36:00 AM1/11/18
to TiddlyWiki
 
Found this solution that works for me:
edit  tiddler $:/core/ui/DefaultSearchResultList

and add a filter for title results and content results. for example:


\define searchResultList()

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

 

<$list filter="[!is[system]!suffix[.png]!suffix[.jpg]!suffix[.jpeg]!suffix[.PNG]!suffix[.JPG]!suffix[.JPEG]search:title{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>

 

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

 

<$list filter="[!is[system]!suffix[.png]!suffix[.jpg]!suffix[.jpeg]!suffix[.PNG]!suffix[.JPG]!suffix[.JPEG]search{$(searchTiddler)$}sort[title]limit[250]]" template="$:/core/ui/ListItemTemplate"/>

 

\end

<<searchResultList>>

Mark S.

unread,
Jan 11, 2018, 9:36:37 AM1/11/18
to TiddlyWiki
You can use regexp:type[^image] in your filter rather than look at each type (.jpg, jpeg, png, ) .

The problem with modifying core is that the search will not upgrade the next time you upgrade TW. So, if there's any improvements in search, you won't get them. You will need to delete $:/core/ui/DefaultSearchResultList, do the upgrade, and then apply your changes again.

Good luck,

-- Mark
Reply all
Reply to author
Forward
0 new messages