Michael,

Extending the concepts shared by others I have built a TOC that you can set 
the number of levels deep on so you do not need to exclude items.

It does require Evans formulae plugin 
<http://evanbalster.com/tiddlywiki/formulas.html> to work just to increment 
a value, this is just an experiment but it provides a simpler macro to 
modify for include excludes and alternate output formatting. In this case 
it uses the heading level of the levels deep and block quotes to indent.

\define toc-levels(root-tiddler max)
<$set name=level value="1">
<$set name=max value="$max$" emptyValue="100">
<blockquote>
$root-tiddler$ (Max levels deep <<max>>)<br>
<$list filter="[tag[$root-tiddler$]]" variable=name>
  <$macrocall $name=loopme tiddlername=<<name>> level=<<level>> max=<<max>>
/><br>
</$list>
</blockquote>
</$set></$set>
\end
\define loopme(tiddlername level max)
<blockquote>
<h$level$>$level$. <$link to="$tiddlername$" tooltip="Click to open 
$tiddlername$"><$view tiddler="$tiddlername$" field="caption" 
format=text><$view 
tiddler="$tiddlername$" field="title" format=text></$view></$view></$link></
h$level$>
<$formula-vars
   next-level=add($level$,1)>
<$list filter="[[$max$]] -[[$level$]]">
<$list filter="[tag[$tiddlername$]]" variable=loop-name>
  <$macrocall $name="loopme" tiddlername=<<loop-name>> level=<<next-level>> 
max="$max$"/>
</$list>
</$list>
</$formula-vars>
</blockquote>
\end


<<toc-levels TableOfContents 3>>

Regards
Tony

On Thursday, October 4, 2018 at 7:36:18 AM UTC+10, [email protected] 
wrote:
>
> I have been using TiddlyWiki 5 for a few years now, and I have always used 
> a hierarchal structure of tags. I am now coming to the point where I have 
> enough sub-levels of tags, it feels like I have to scroll more horizontally 
> than vertically.
>
>
> One of the things I really like about TiddlyWiki is that tags can be just 
> another level of tiddlers, and I would quite like to retain that ability to 
> click on a tag and jump to the parent tiddler right away. Unfortunately, 
> this system has resulted in an ungainly table of contents.
>
>
> I would like to ask if there is any way to hide or deactivate parts of the 
> right bar table of contents after a certain level, or hide certain tags 
> specifically.
>
>
> For example, if my TOC looked like this:
>
>
>
>    - 
>    
>    Item 1
>    - 
>       
>       Subitem 1
>       - 
>          
>          Extra 1
>          - 
>          
>          Extra 2
>          - 
>          
>          Extra 3
>          - 
>    
>    Item 2
>    - 
>       
>       Subitem 2
>       - 
>    
>    Item 3
>    - 
>       
>       Subitem 3
>       
>
> And so on.
>
>
> Would there be a way to hide the list under Section 1, so instead my TOC 
> looked like this:
>
>
>
>    - 
>    
>    Item 1
>    - 
>       
>       Subitem 1
>       - 
>    
>    Item 2
>    - 
>       
>       Subitem 2
>       - 
>    
>    Item 3
>    - 
>       
>       Subitem 3
>       
>
> Would something like this be doable?
>
>
> Thank you.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/de9ced53-3b6c-4b47-aae7-05773671fe01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to