Display search results

91 views
Skip to first unread message

Stefan Waldherr

unread,
Sep 17, 2018, 4:57:09 AM9/17/18
to TiddlyWiki
Hi,

please bear with me if this has been asked before (I'd appreciate a link). I like to search all my tiddlers with some criteria (e.g. contains X and is tagged Y) and the result is displayed on the left. 
By result I mean only the tiddlers that satisfy the search criteria are displayed (full content), all others are hidding. So far I've found numerous examples to construct lists, but those lists only contained titles but no content. This is probably trivial for an advanced user but not for a newbie ;-) 

Thanks, Stefan 

Mark S.

unread,
Sep 17, 2018, 11:36:51 AM9/17/18
to TiddlyWiki
It would help to see what code you have been looking at. In general, most <$list> widgets with search just use <<currentTiddler>> to display the title. But you can display the contents as well by using the transclude widget. This works, but be warned that if you use it at tiddlywiki.com the display of contents will slow your browser down:

<$list filter="[search{$:/temp/search}]">
<
<currentTiddler>><br/>
<$transclude tiddler=<
<currentTiddler>>/>
</$list>

HTH
-- Mark

Stefan Waldherr

unread,
Sep 17, 2018, 12:28:42 PM9/17/18
to TiddlyWiki
HI Mark, 

thanks for the help. I've found a way to list all tiddlers that satisfy some search criteria and transclude them (piece by piece) into a single tiddler (a bit awkward given that I have to query title, subtitle, etc individually). However, that is not exactly what I was looking for ;-)

I thought of the search function like something that hides everything on the left side of the UI (not sure what that area is called) and only shows tiddlers that satisfy the search criteria. I plan to write tiddlers that contain some text or tags and I want to add a search function to the right that I frequently use with the same parameters.

Best, Stefan. 

Mark S.

unread,
Sep 17, 2018, 3:59:23 PM9/17/18
to TiddlyWiki
The left side is known as the story river (I think). It's where the open tiddlers appear. You can change what tiddlers appear by modifying the $:/StoryList.

Here's an example:

<$list filter="[search{$:/temp/search}limit[6]]">
<$view field="title"/>
<br/>
</$list>

<$button>''Open in story river?''

<$action-listops $tiddler="$:/StoryList" $filter="[search{$:/temp/search}limit[6]]"/>
</$button>


I've deliberately limited the number of tiddlers that will open to 6, because you could pretty much hang your browser if you put in a request that opens all your tiddlers. It uses the contents of the standard search field for input.

Be sure to have a backup before trying this.

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