From ab2e571ee6c77c288c8b221219acfa70688d0fe1 Mon Sep 17 00:00:00 2001 From: pmario Date: Sat, 4 May 2024 15:28:11 +0200 Subject: [PATCH] rename 1 variable change docs a bit --- core/wiki/macros/toc.tid | 91 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 6aac11a57..d515bcbe1 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -29,12 +29,12 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc \end - -\function tf.toc-getItemTemplate() [!is[blank]then] :else[get[toc-itemTemplate]] + +\function tf.toc-getItemTemplateTitle() [!is[blank]then] :else[get[toc-itemTemplate]] \procedure _itemTemplate() -<$transclude $tiddler=<> > +<$transclude $tiddler=<> > <> \end @@ -48,7 +48,7 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc \procedure toc-includeField() toc-include \procedure toc-filterField() toc-filter - + \function tf.toc-itemClassFilter() [get[text]matchthen[toc-item-selected]else[toc-item]] \function tf.toc-includeClass() [subfiltermatchthen[tc-toc-include]] \function tf.toc-filterClass() [subfiltermatchthen[tc-toc-filter]] @@ -57,12 +57,12 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc \function tf.toc-itemClass() [] [] [] [] +[join[ ]] - + \function tf.toc-getHideText() [get] \function tf.toc-hideIsYes() [format:titlelist[]] \function tf.toc-hide() [match[yes]then] :else[] - + \function tf.toc-include() [get] \function tf.toc-filter() [get] @@ -73,10 +73,10 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc - + \function tf.toc-filterString() [!is[blank]then] :else[!is[blank]thenelse] - + \function tf.toc-newPath() [addsuffix[/]addsuffix] + \procedure toc-body(tag,sort:"",itemClassFilter,exclude,path) <$set name=currentTiddler filter="[!is[blank]thenelse]"> @@ -105,7 +105,7 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter see: tf.toc-i <% if [all[current]toc-link[no]] %> <<_itemTemplate>> <% else %> - + <$link to={{{ [get[target]else] }}}> <<_itemTemplate>> @@ -142,23 +142,23 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter see: tf.toc-i \procedure toc-openBranch(path,currentTiddler,manual:"no") -\procedure recursiveOpen(exclude, path) - - <$let path={{{ [] "/" [] +[join[]] }}}> - - <$list filter="[subfilter] [subfilter] -[] -[subfilter]" > - <% if [subfilter] [subfilter] -[] -[subfilter] %> - <$set name="_excluded" filter="[subfilter] []"> - - <$qualify name="toc-state" title=<> > - <$action-setfield $tiddler=<> text="open"/> - <$macrocall $name="recursiveOpen" exclude=<<_excluded>> path=<> /> - - - <% endif %> - - -\end recursiveOpen + \procedure recursiveOpen(exclude, path) + + <$let path={{{ [] "/" [] +[join[]] }}}> + + <$list filter="[subfilter] [subfilter] -[] -[subfilter]" > + <% if [subfilter] [subfilter] -[] -[subfilter] %> + <$set name="_excluded" filter="[subfilter] []"> + + <$qualify name="toc-state" title=<> > + <$action-setfield $tiddler=<> text="open"/> + <$macrocall $name="recursiveOpen" exclude=<<_excluded>> path=<> /> + + + <% endif %> + + + \end recursiveOpen <% if [match[yes]] %> <$qualify name="toc-state" title=<> > @@ -185,8 +185,8 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter see: tf.toc-i \procedure toc-item(isUnlinked:"") <% if [get[text]else[close]match[close]] %> @@ -248,7 +248,7 @@ Shows an expandable toc. Item always have an open/close chevron \procedure toc-expandable(tag,sort:"",itemClassFilter:"",exclude,path,captionField,tagField,parentField,itemTemplate) <$set name=currentTiddler filter="[!is[blank]thenelse]">
    - + <$list filter=` [subfilter] :else[subfilter$(sort)$] [subfilter] -[] -[subfilter]`> @@ -283,15 +283,7 @@ Shows an expandable toc. Item always have an open/close chevron
  1. >> <$link to={{{ [get[target]else] }}}> - -<$log - ct=<> - tf.toc-hasChildren=<> - tf.toc-hasChildren-f= {{{ [subfilter] - exclude=<> }}} - filter={{{ [subfilter] [subfilter] -[] -[subfilter] }}} -/> - + <% if [subfilter] [subfilter] -[] -[subfilter] +[limit[1]] %> <> <% else %> @@ -312,9 +304,18 @@ Shows an expandable toc. Item always have an open/close chevron
  2. \end + + hasChildren={{{ [subfilter] }}} path=<> exclude=<>/> +--> + \procedure toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path,captionField,tagField,parentField,itemTemplate) <$qualify name="toc-state" title=<> > @@ -342,7 +343,7 @@ Shows an expandable toc. Item always have an open/close chevron \end \procedure toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path,captionField,tagField,parentField,itemTemplate) @@ -376,10 +377,10 @@ If an item has no children, there is no open/close chevron \end - +If a toc-item link is clicked it will open the tiddler in the story river +========================================================================= --> \procedure toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"",exclude,captionField,tagField,parentField,itemTemplate) <$tiddler tiddler={{{ [get[text]] }}}>
    @@ -409,7 +410,7 @@ If a toc-item link is clicked it will open the tiddler in the story \end \procedure toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"",exclude,captionField,tagField,parentField,itemTemplate)