From e884c1178c233214764bec2491c1a4b0c71d23e8 Mon Sep 17 00:00:00 2001 From: pmario Date: Sun, 4 Feb 2024 21:57:34 +0100 Subject: [PATCH] change possible fields to: toc-hide, toc-override and toc-include --- core/wiki/macros/toc.tid | 44 +++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 159364eb5..200e87e02 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -20,19 +20,20 @@ tags: $:/tags/Macro \function tf.toc-itemClassFilter() [get[text]matchthen[toc-item-selected]else[toc-item]] \function tf.toc-includedClass() [subfiltermatchthen[toc-item-included]] -\function tf.toc-excludedClass() [!is[blank]then[toc-item-excluded]] +\function tf.toc-hideClass() [!is[blank]then[toc-item-excluded]] -\function tf.toc-itemClass() [] [] [] +[join[ ]] +\function tf.toc-itemClass() [] [] [] +[join[ ]] -\function tf.toc-getExcludeText() [get[toc-exclude]] -\function tf.toc-excludeIsYes() [format:titlelist[]] +\function tf.toc-getHideText() [get[toc-hide]] +\function tf.toc-hideIsYes() [format:titlelist[]] - -\function tf.toc-exclude() [match[yes]then] :else[] + +\function tf.toc-hide() [match[yes]then] :else[] - + \function tf.toc-include() [get[toc-include]] +\function tf.toc-override() [get[toc-override]] \function tf.toc-newPath() [addsuffix[/]addsuffix] @@ -40,14 +41,13 @@ tags: $:/tags/Macro \procedure toc-body(tag,sort:"",itemClassFilter,exclude,path)
    - - <$list filter=` [subfilter] + <$list filter=` [subfilter] :else[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] - -[] -[subfilter]`> - <%if [] -[subfilter] %> + [subfilter] -[] -[subfilter]`> + <%if [] -[subfilter] %> <$let item=<> __path=<> > - - <$set name="__excluded" filter="[subfilter] [] [subfilter]"> + + <$set name="__excluded" filter="[subfilter] [] [subfilter]">
  1. >> <% if [all[current]toc-link[no]] %> <> @@ -142,13 +142,12 @@ Shows an expandable toc. Item always have an open/close chevron \procedure toc-expandable(tag,sort:"",itemClassFilter:"",exclude,path)
      - - <$list filter=` [subfilter] + <$list filter=` [subfilter] :else[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] - -[] -[subfilter]`> - <%if [] -[subfilter] %> + [subfilter] -[] -[subfilter]`> + <%if [] -[subfilter] %> <$let __path=<>> - <$set name="__excluded" filter="[subfilter] [] [subfilter]"> + <$set name="__excluded" filter="[subfilter] [] [subfilter]"> <% if [all[current]toc-link[no]] %> <$macrocall $name="toc-unlinked-expandable-body" @@ -226,13 +225,12 @@ If an item has no children, there is no open/close chevron \procedure toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path)
        - - <$list filter=` [subfilter] + <$list filter=` [subfilter] :else[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] - -[] -[subfilter]`> - <%if [] -[subfilter] %> + [subfilter] -[] -[subfilter]`> + <%if [] -[subfilter] %> <$let __path=<>> - <$set name="__excluded" filter="[subfilter] [] [subfilter]"> + <$set name="__excluded" filter="[subfilter] [] [subfilter]"> <% if [all[current]toc-link[no]] %> <$macrocall $name="toc-unlinked-selective-expandable-body"