Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Table of Content in TiddlyWiki

If I go TiddlyWiki site I can see tab Content. How can I create my own table of content for my tiddlywiki file?

like image 759
lowtech Avatar asked Aug 26 '15 18:08

lowtech


3 Answers

I found the documentation for this really confusing, but here's what I did that works best:

<div class="tc-table-of-contents">

<<toc-selective-expandable 'TableOfContents' sort[ind]>>

</div>

Then, tag each tiddler with TableofContents.

Lastly, when editing each tiddler, add a new field named "ind" (for index - you can change this to whatever you like, so long as it's not being used elsewhere, of course). Assign a value to "ind" starting with 0 to tell it what order you want the tiddlers to go in. I incremented by 10 instead of 1 in case I want to rearrange a few things or insert more in the middle.

like image 150
Andrew Avatar answered Nov 08 '22 21:11

Andrew


Create a new tiddler and give the title Contents

Under tags, give the value $:/tags/SideBar

Under type the text for this tiddler, give <$list filter={{$:/core/Filters/AllTiddlers!!filter}} template="$:/core/ui/ListItemTemplate"/>

like image 5
Shankar Rajan Avatar answered Nov 08 '22 23:11

Shankar Rajan


This is explained in the documentation.

The short version: Add some tag (e.g. Content) to the pages you want to appear in the TOC; then in the place where you want it to appear, use one of the macros with that tag name (e.g. <<toc Content>>). To make a nested TOC, tag pages with the names of tags that appeared at the top level. So for example if you have a tiddler named First that is tagged with Content, then you can tag more tiddlers with First, and they will appear indented below First in the TOC.

like image 3
Karl Knechtel Avatar answered Nov 08 '22 22:11

Karl Knechtel