On Wednesday, January 22, 2020 at 7:36:42 AM UTC-8, Mohammad wrote:
>
>  In your solution, how one can EXCLUDE one branch or item from toc?
> I means assume in tiddlywiki.com I want to exclude (hide) Examples branch 
> from!
> How the below code should be modified to reflect this exclusion?
>

When you *invoke* the macro, just add a pre-defined value for the "exclude" 
parameter, like this:

<<toc-all TableOfContents "-[[Examples]]">>

Note that you can exclude multiple branches if you want.  E.g.:

<<toc-all TableOfContents "-[[Examples]] -[[Filter Examples]] -[[Macro 
Examples]] -[[Variable Examples]] -[[Widget Examples]] -[[WikiText 
Examples]]">>

enjoy,
-e



 

>
> --Mohammad
>
> On Wednesday, January 22, 2020 at 4:29:30 PM UTC+3:30, Eric Shulman wrote:
>>
>> Here's a very simple recursive "tree walk" that shows the entire 
>> TableOfContents tree:
>>
>> \define toc-all(here,exclude)
>> <$list filter="""[title[$here$]tagging[]] $exclude$ -[[$here$]]""">
>>    <$text text=<<currentTiddler>>/>
>>    <div style="padding-left:2em;">
>>        <$macrocall $name="toc-all" here=<<currentTiddler>> 
>> exclude="""$exclude$ -[[$here$]]"""/>
>>    </div>
>> </$list>
>> \end
>>
>> <<toc-all TableOfContents>>
>>
>> Note that it does NOT require multiple macros to do the recursion, and 
>> uses the dynamically updated "exclude" param to avoid infinite loops.
>>
>> enjoy,
>> -e
>>
>>

-- 
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/b2f8525a-d1f0-435b-9d22-6eb36f01927e%40googlegroups.com.

Reply via email to