Typo Led to Great Discovery! Numbered Hierarchies in TOC

65 views
Skip to first unread message

Aidan Grey

unread,
Jul 16, 2019, 5:44:57 PM7/16/19
to TiddlyWiki
I have seen a LOT of people looking for numbered hierarchies, and I've seen a lot of complicated ways to get to them. I think I accidentally found a solution.

<div class="toctc-table-of-contents">
<<toc-selective-expandable "TOC" "nsort[gord]">>
</div>


That one missing space between "toc"and "tc-table-of-contents" resulted in fully and accurately numbered items, all the way down. Gord is a numeric field (for grammar order), and the nsort provides the correct numbering at every level, even if I change the gord values.

It's not "06.11.02 Perfective", but it's partway there. This might be a clue to how to make those labels...

Whee!

Aidan
capTOC.PNG

Aidan Grey

unread,
Jul 16, 2019, 5:58:05 PM7/16/19
to TiddlyWiki
Specifics, which I realize I left out:

I have tocP plugin installed. In this case, I had two instances, one right after the other, and I changed one to be the usual TOC process (class ="tc-table...") so that I could fix my old style TOC and change to the parent based one. "tocP" is a required class for the plugin, but "toc" is not for the core TOC. I forgot, and deleted the P to leave "toc tc-table-..." only I accidentally the P and the space.

And voila.

Now I'm keeping the numbered one.

So, if anyone wants to sort out how/why this works, it's probably somewhere in the tocP plugin...

A Gloom

unread,
Jul 16, 2019, 8:49:22 PM7/16/19
to TiddlyWiki
LoL

not...

Whee!

but...

Eureka!

I'll have fo check it out, mebbe could use it without the plugin?
Reply all
Reply to author
Forward
0 new messages