Here's a toc clause using "HelloThere" as a root that may do what you want:
<<toc "HelloThere" "has[caption]get[caption]][tag[HelloThere]!has[caption]get[title]]+[sort[]">> Notice that the "sort" clause has no opening or ending [ or ] respectively. Note that the tag[HelloThere] had to be repeated for the sub-clause. The "all[current]" would have used the name of the original tiddler all the way down, which isn't what you want. The TOC above seems to work, but it will try to link to a tiddler with the caption as title. Since that tiddler probably doesn't exist, the link will go to a non-existent tiddler. To get a more robust solution, you will need to either make a copy of the original TOC macro and hack it, or write your own recursive TOC style macro. You might search the forum for TOC and "recursive" since it's likely that someone, possibly me, has already written such a thing. Or better yet, take a look at: https://kookma.github.io/TW-Scripts/#A%20Simple%20Recursive%20TOC%20Macro While there, check if Mohammad has posted any other recursive solutions. HTH On Friday, March 27, 2020 at 9:56:27 AM UTC-7, The Islander wrote: > > The question is where do we put this filter? > "[all[current]has[caption]get[caption]] [all[current]!has[caption]get[title]] > +[sort[]]" > > > > You can't put it in the toc macro because it complains Filter Expression > Error. > > You can't do something like this: > <$list filter="[all[current]has[caption]get[caption]] > [all[current]!has[caption]get[title]] +[reverse[]]"> > <div class="tc-table-of-contents"> > <<toc-selective-expandable "TableOfContents">> > </div> > </$list> > > because it doesn't do any sort. > > So where would a filter like this go? > > Thanks! > > > On Wednesday, September 12, 2018 at 10:18:12 AM UTC-7, Mark S. wrote: >> >> It sounds like you have things mostly sorted out. >> >> A filter like this might allow you to sort by caption or title (whichever >> is present): >> >> [has[caption]get[caption]] [!has[caption]get[title]] +[sort[]] >> >> Just remember, that if you use caption then there might be more than one >> tiddler that uses that caption and you can't form a standard link based on >> the caption name. >> >> Good luck! >> -- Mark >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/40d98cc9-6284-49bd-9b50-33054dd7a678%40googlegroups.com.

