TOC hierarchy structuring

110 views
Skip to first unread message

Christian Macedo

unread,
Jul 17, 2019, 5:11:10 AM7/17/19
to TiddlyWiki

Hi all, 


First off, thanks to everyone who participates in these discussion groups. I've been referencing these discussions significantly while I've been setting up TW5. 


I've currently hit an impasse when it comes to creating a TOC at a top level. In the screenshot below you can see I have a 'Contents' tiddle. This contains a three tabs which are referenced explicitly with :


Contents

<<tabs "Literature Science TiddlyWiki">>



Under the Sociology tiddle I'm also referencing related items  like so:


Sociology

<<tabs "[tag[Sociology]tag[Index]]">>


And further down the (ersatz) hierarchy I have one tiddle which then contains a filter which looks tiddlers with the relevant tags:

<$list filter="[tag[Sociology]tag[Model]sort[title]]"/>



The issue is that the 'Contents' tiddler lists these items like so:


  • Sociology
    • Seven Generation Model
    • Sociology Model

When I'm expecting (or wanting perhaps) the following:

  • Sociology
    • Sociology Model
      • Seven Generation Model

And, a related question: How can I limit the TOC depth? I've checked tocp but this doesn't quite help out. 




Screenshot 2019-07-17 10.01.17.png


Aidan Grey

unread,
Jul 17, 2019, 10:14:29 AM7/17/19
to tiddl...@googlegroups.com
More stuff that I'm actually familiar with! Time to return the favors:

You said **********************
The issue is that the 'Contents' tiddler lists these items like so:

  • Sociology
    • Seven Generation Model
    • Sociology Model
When I'm expecting (or wanting perhaps) the following:

  • Sociology
    • Sociology Model
      • Seven Generation Model

I said **********************  

Without seeing the details I can't be sure. But it LOOKS like you tagged "Seven Generation Model" to "Sociology", but you need to tag it to "Sociology Model".


You said **********************  

And, a related question: How can I limit the TOC depth? I've checked tocp but this doesn't quite help out. 

I said **********************  

Actually, tocP will help here. With regular toc, the tagging means the hierarchy is there no matter what, and will be pulled in.

tocP, though, uses a different methodology to generate the hierarchy in the TOC - the parent field. I used this for my linguistic work as follows:
1. tag everything as normal, for hierarchy purposes.
2. use the parent field as needed for TOC purposes.

So, for example, if I read your intent correctly, [[Seven Generation Model]] will be tagged to "Sociology Model" (which is tagged to Sociology), but will NOT have a parent, so that it doesn't show up in the TOC.

I use a complex model of this myself, with bottom levels not appearing in the TOC, only on the parent (via tag filters)

Hope that helps!
Aidan



--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/e1850be3-324f-45fa-b992-18c21c7b99dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Macedo

unread,
Jul 17, 2019, 11:41:54 AM7/17/19
to TiddlyWiki
Excellent, that helps.

Follow on question: how do I create a tag which includes a space?

Christian Macedo

unread,
Jul 17, 2019, 11:42:44 AM7/17/19
to TiddlyWiki
Ignore that. 

I did it :)

Just type as normal... 

Aidan Grey

unread,
Jul 17, 2019, 12:11:19 PM7/17/19
to tiddl...@googlegroups.com
:) It's a learning process, as some of the things you think would matter, from other apps, don't matter in TW. And vice versa!

Glad it helped!

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Ste Wilson

unread,
Jul 17, 2019, 1:39:30 PM7/17/19
to TiddlyWiki
Of you want your toc to list in an order other than alphabetical you can make a list field with the titles of tiddlers in the correct order. Put titles with spaces in inside [[]]. (fields are hidden at the bottom of the tddler).

E.g.
List [[first thing]] [[next thing]] thingthing...

Aidan Grey

unread,
Jul 17, 2019, 8:26:28 PM7/17/19
to tiddl...@googlegroups.com
I have a separate field called ord with numeric values. When I call the TOC, I use the filter “nsort[ord]”, and voila.
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/d7699cdc-0f0a-43f4-bc4c-328444d77451%40googlegroups.com.

TonyM

unread,
Jul 18, 2019, 8:24:57 PM7/18/19
to TiddlyWiki
For custom sorts see also sortby operator.

Tony

Reply all
Reply to author
Forward
0 new messages