At this link there are basic instructions for changing the sort order of 
the table of contents using the toc macro: 
https://tiddlywiki.com/#How%20to%20change%20the%20sort%20order%20of%20sub-branches%20in%20a%20TOC%20macro
 (. 
I would like to have more control over how the actual tagging/filtering is 
done. Specifically, I would like to recursively apply a filter so that any 
list items that are tagged with a sub-category are excluded from the parent 
category, even if they are also tagged with the parent category.

Let me illustrate. I got it to work using the *list* field in the parent 
category with the *list-links* macro like so:

<<list-links "[tag<currentTiddler>] -[{!!list}split[ ]tagging[]]">>

with a *list* field like this:
Subcategory1 Subcategory2


But try as I might I can't get a similar thing to work in the Table of 
Contents. Things like the following don't work:
<div class="tc-table-of-contents">
<<toc-selective-expandable tag:"Contents" exclude:"[{!!list}split[ 
]tagging[]]" >>
</div>


Or hacks like this:
<div class="tc-table-of-contents">
<<toc-selective-expandable tag:"Contents" sort:"[{!!list}split[ ]tagging[]" 
>>
</div>


I've spent too many hours on this now (not wasted though! I've learned much 
about filters in TW). Any tips on how to achieve what I want? I'm sure 
there's a clever set of filters that I just can't quite get right. I'm also 
not afraid to edit the core toc macro if needs be. Thanks!

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f2885c31-dcc3-4860-8949-39d2cb594823o%40googlegroups.com.

Reply via email to