Open ericshulman opened 1 year ago
Note that, in combination with https://github.com/Jermolene/TiddlyWiki5/issues/7239 (which enables passing of filter syntax directly in the exclude parameter), we could simplify the above to:
Yes. I think those 2 should go together, then we can officially document the "exclude" parameter. Till no it is kind of a hack.
Thanks @ericshulman
Would anyone like to make a PR for these changes?
@ericshulman -- I think we can close this one. Features have been merged for v5.3.0
Describe the bug
Internally, the
toc-*
macros use anexclude
parameter to automatically "prune" the branches of the tree to prevent infinite "tag loops" by not showing links to tiddlers that have already been listed as a parent tiddler in the current branch of the tree. For mosttoc-*
macros, theexclude
parameter can also be passed in with an initial list of tiddler titles. This allows the specified titles to be explicitly bypassed when showing the resultant tree. However, thetoc-tabbed-internal-nav
andtoc-tabbed-external-nav
macros do not support passing in an initial value for this parameter, preventing its use as a "bypass" for specific titles.To correct this, some minor additions to the existing
toc-tabbed-internal-nav
andtoc-tabbed-external-nav
macro definitions are needed in$:/core/macros/toc
:First , in
toc-tabbed-internal-nav
, addexclude
as a parameter and pass the parameter value along in the$macrocall
totoc-tabbed-external-nav
:Then, in
toc-tabbed-external-nav
, addexclude
as a parameter and pass the parameter value along in the$macrocall
totoc-selective-expandable
:With these minor additions in place, it will then be possible to exclude specific titles. For example, to exclude the "HelloThere" branch from the TableOfContents at https://TiddlyWiki.com, you can write:
or, to exclude the "example" tiddlers (i.e., in the
Reference > Filters > Filter Operators
branch):Note that, in combination with https://github.com/Jermolene/TiddlyWiki5/issues/7239 (which enables passing of filter syntax directly in the
exclude
parameter), we could simplify the above to: