From 780cf038aba727beb77f44fa2275f5b660d6841d Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 14 Feb 2024 13:39:36 +0100 Subject: [PATCH] toc - do not show "more" chevron, it all child nodes are hidden --- core/wiki/macros/toc.tid | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index d2d2767f3..6aac11a57 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -127,14 +127,15 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter see: tf.toc-i -\procedure toc-tagLikeChildFilter() [getenlist-input[]] -\procedure toc-parentChildFilter() [has] :filter[getmatch<..currentTiddler>] -\procedure toc-tagChildFilter() [tag] +\procedure toc-tagLikeChildFilter() [getenlist-input[]] -[toc-hide[yes]] +\procedure toc-parentChildFilter() [has] :filter[getmatch<..currentTiddler>] -[toc-hide[yes]] +\procedure toc-tagChildFilter() [tag] -[toc-hide[yes]] \function tf.toc-hasChildren() [!is[blank]then] - :else[!is[blank]thenelse] + :else[!is[blank]then] + :else[] \end \function tf.toc-stateTitle() [[$:/state/toc]] [] "/" [] +[join[]] @@ -283,6 +284,14 @@ Shows an expandable toc. Item always have an open/close chevron <$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 %>