A Confusion of TOC and Search

113 views
Skip to first unread message

Mohammad

unread,
Jan 8, 2019, 11:48:48 PM1/8/19
to tiddl...@googlegroups.com
There are a lot of discussions on using search and table-of-contents features in Tiddlywiki. One confusion I have encountered recently is using caption.

I use numbers for my tiddler titles in a wiki contains several hundred tiddlers

100.01
100.02
100.03
...


and then I used meaningful captions for these tiddlers like

Create list numbers
List widget and its application
Tables in Tiddlywiki
...

When I make a table of contents, the caption is used and it is meaningful and semantic way to create table of contents
When you make search you see only 100.01, 100.02 and like that.


The current TOC mechanism is also not flexible, discussed several times here. You cannot exclude part of tiddlers, you cannot make tables based on other criteria.

I followed bilmas discussion and some others on re implementing TOC and search features.


These are important tools in daily use and I hope developer pay special attention to this.


Best regards
Mohammad


Kalmir

unread,
Jan 9, 2019, 1:48:57 AM1/9/19
to TiddlyWiki
Thanks for bringing this up. I have no solution, I just want to mention that this is also in my "to figure out" list.

Ideally, I would like the search to use+show:
1. subtitle (I'm using uni-link plugin);
2. if there's no subtitle, use caption;
3. if there's neither subtitle nor caption, use title.

Mal

unread,
Jan 9, 2019, 2:44:13 AM1/9/19
to TiddlyWiki
Just to add another thought: I often use a numerical prefix followed by a suitable descriptive title and then add a caption with just the descriptive part of the title.

This gives the best of both worlds. The full title displays in the search results and the caption displays in the TOC.

Mal

Riz

unread,
Jan 9, 2019, 3:02:40 AM1/9/19
to TiddlyWiki
The tiddler you are looking for is " $:/core/ui/DefaultSearchResultList". You can change the list filter to something like

<$list filter="[!is[system]search:caption{$(searchTiddler)$}sort[caption]limit[250]]">
{{!!caption}}
</$list>

@Kalmir. Try replicating above step to include whatever field you would want listed.

sincerely,
Riz

https://ibnishak.github.io/Timimi/

Mohammad

unread,
Jan 10, 2019, 3:31:48 AM1/10/19
to TiddlyWiki
Thanks $Kalmir, @Mal and @Riz

Riz,

 I got the point, so I can change the core tiddler to see better results based on two or three fields. This solved my issue.
 Thank you. I bookmark this.

 One more question: do you have any solution to exclude some tiddlers from TOC results. Assume I have 10 tiddlers tagged with Contents
 but two of them also tagged with test and I want to exclude these two. 
 For your information I could use the exclude attribute before TW 5.1.18, but then PMario asked to stop this as he said exclude is for internal use  

As short solution I have made a copy of toc macro from 5.1.17 into my 5.1.19 and use it.

--Mohammad

Mark S.

unread,
Jan 10, 2019, 10:10:39 AM1/10/19
to TiddlyWiki
You can use the sort argument to sneak in extra, simple requirements:

sort: "!tag[test]sort[title]"

Mohammad

unread,
Jan 10, 2019, 12:35:40 PM1/10/19
to tiddl...@googlegroups.com
Wow!
 Thank you Mark! It works! :-)

If Mario  knows, he will stop us :-) But by that time I gonna to use it :-)


--Mohammad

Mohammad

unread,
Jan 10, 2019, 1:15:06 PM1/10/19
to TiddlyWiki
Mark I even can exclude tiddler like this

sort: "!search:title[test]"

For excluding all tiddlers has test in their title and much more :-)


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