[tw5] Re: self-editing table of contents snippet

I can’t figure out how to add sorting to this, so that if journal entries is tagged with this tiddler, they appear reverse sorted by title so the newest entry appears at the top of the list. I’ve tried adding !sort[title] to the end of the line, just before the ‘/>’, but then it just appears in the tiddler body as text and defeats the entire action of the toc code.

Documentation of the macro is here: https://tiddlywiki.com/#Table-of-Contents%20Macros

It has a sort parameter, so you’ll have to add sort="!sort[title]", so it’s knows what to do with the filter.

<div class="tc-table-of-contents">

<$macrocall $name=toc-selective-expandable tag=<<currentTiddler>> sort="!sort[title]"/>

1 Like

Works like a charm. Thanks

Works like a charm! Thanks!