TW-TOC - how to exclude all tiddlers with certasin tagh from tree

58 views
Skip to first unread message

skaczm...@gmail.com

unread,
Nov 8, 2020, 3:26:30 PM11/8/20
to TiddlyWiki

Hi, I have a quick question - as tittles says, I need to exclude all tiddlers with certain tag from TW-TOC toc tree. How to do that? Seems like the original tutorial only shows how to exclude tiddler with certain name:

<<multilevel-toc-expandable tag:"tree-test" exclude:"-[[excluded-tiddler]]" stateTiddler:"tree-test-state">>

TW Tones

unread,
Nov 8, 2020, 8:03:04 PM11/8/20
to TiddlyWiki
skaczm...@gmail.com

The  exclude:"-[[excluded-tiddler]]" is a filter that names a single tiddler. You can replace this with a filter of anything, noting the "-" symbol says to remove these from the list.

However keep in mind in a toc such exclusion will then not have their children iterated.

Tones

Eric Shulman

unread,
Nov 8, 2020, 9:08:46 PM11/8/20
to TiddlyWiki
On Sunday, November 8, 2020 at 12:26:30 PM UTC-8, skaczm...@gmail.com wrote:
<<multilevel-toc-expandable tag:"tree-test" exclude:"-[[excluded-tiddler]]" stateTiddler:"tree-test-state">>

"multilevel-toc-expandable" is not defined in $:/core/macros/toc, so I assume it is a custom macro.
There are several custom versions of TOC macros that have been written by others.
Can you post the source code for this macro (or at least a link to where you got it)?

Note that the "exclude:" parameter is actually intended for internal use.
The value of exclude is dynamically updated as the TOC recursion occurs,
in order to prevent "loops" caused by revisiting a tiddler that has already
been displayed in a given branch of the tree.

-e
Reply all
Reply to author
Forward
0 new messages