You can use the sort attribute to insert whole filter runs. However, the 
syntax will look lopsided:

<<toc-selective-expandable 'Section' sort:"sort[title]]+[!tag[spam]">>

Notice that the brackets are not balanced. Basically the macro is providing 
the final, right-hand square bracket. You need to provide sort criteria 
because you're over-riding the default.

This seemed to work in my tests. Topmost elements were tagged with 
"Section" so that they all hung together.

Good luck!

On Monday, January 20, 2020 at 6:08:24 AM UTC-8, si wrote:
>
> Hi folks.
>
> How could you exclude all tiddlers with a certain tag from a 
> Table-of-Contents, but *only* within a specific sub-section of the 
> hierarchy?
>
> For example, say that I have a the following table of contents:
>
>    - Section1
>       - Subitem
>       - Subitem
>    - Section2
>       - Subitem
>       - Subitem
>    - Section3
>       - Subitem
>       - Subitem
>    
> How could I apply a filter to the macro that excludes all tiddlers with 
> the tag "spam", but only apply it to the descendants of "Section2"?
>
> I have tried a couple of things so far:
>
> First I tried creating separate Table-of-Contents macros for each Section:
>
> <div class="tc-table-of-contents">
>
> <<toc-selective-expandable 'Section1Tag'>>
> <<toc-selective-expandable 'Section2Tag' sort:"!tag[spam]">>
> <<toc-selective-expandable 'Section3Tag'>>
>
> </div>
>
> This works but puts a blank line between each section in the TOC. Maybe 
> I'm being nitpicky but it makes the TOC look much uglier than it needs to 
> and takes up an impractical amount of space when you have a lot of sections.
>
> I have also tried using the following:
>
> <div class="tc-table-of-contents">
>
> <<toc-selective-expandable 'TableOfContents' sort:"!tag{!!exclude-tag}">>
>
> </div>
>
> And then adding the field "exclude-tag=spam" to the "Section2" tiddler. 
> This didn't work at all.
>
> Does anyone know of a tidy way to do this?
>
> Thanks a lot for your help. Si
>

-- 
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/1e2e98c1-e380-47c2-a515-07f114abf5be%40googlegroups.com.

Reply via email to