Hi @TonyM, could you clarify with some code explaining what you've said below?
For example, in this post: https://groups.google.com/d/msg/tiddlywiki/tH2hWn2XPIM/Cpsqw4QAAwAJ I don't see the list filter affecting the output of the toc macro at all. <$list filter="[all[current]has[caption]get[caption]] [all[current]!has[caption]get[title]] +[reverse[]]"> <div class="tc-table-of-contents"> <<toc-selective-expandable "TableOfContents">> </div> </$list> On Friday, July 13, 2018 at 6:58:37 PM UTC-7, TonyM wrote: > > Andrej, > > Good work, > > I was about to reply with the basic "recursion" approach, where the macro > calls itself, importantly from inside a list widget, so it is limited to > the set of members in that lists filter. I think a lot of people leave this > behaviour to toc macros when you can build it yourself once you understand > the pattern. > > That is the macro will work its way through all members of that > hierarchical list, down branches to the leaves, once the leaf siblings are > all listed it returns to the previous level.... > > In side the list other than calling the macro you can place anything you > want to take place on every item in the hierarchy. > > Regards > Tony > > > On Friday, July 13, 2018 at 8:25:10 PM UTC+10, Andrej Korenić wrote: >> >> Well, I got it working... I don't know how but here is the solution... >> >> I created tiddler called Transclude chapters that was tagged with >> $:/tags/Macro. Code is this: >> >> \define transclude_chapters(tag,sort:"",itemClassFilter,exclude,path) >> >> <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] >> -[[$tag$]] $exclude$"""> >> <$vars item=<<currentTiddler>> path="""$path$/$tag$""" >> excluded="""$exclude$ >> -[[$tag$]]"""> >> <$set name="toc-item-class" filter="""$itemClassFilter$""" >> emptyValue="toc-item" value="toc-item-selected"> >> >> <$transclude mode='block'/> >> >> <$macrocall $name="transclude_chapters" tag=<<item>> sort= >> """$sort$""" itemClassFilter="""$itemClassFilter$""" exclude=<<excluded>> >> path=<<path>>/> >> >> </$set> >> </$vars> >> </$list> >> \end >> >> So I just call it with the root tag: >> >> <<transclude_chapters "Table of Contents">> >> >> and that's it :) >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/dc13b4e5-d97d-4b54-80f9-98c6ac457d6a%40googlegroups.com.

