I followed the instructions and the plugin appeared to be installed so I suspect my problem is more likely that I don’t really know what to do to get it to work. I am completely new to TW so struggling to figure out how to do things.
So, I assume you have an established set of tiddlers that form a TOC (that is, tiddlers that tag other tiddlers) ?
Mohammad 's macros allow you to form a TOC from tiddlers that have been used to tag other tiddlers. There’s a set of these macros already in TiddlyWiki, but one of Mohammad’s version adds navigation so you can move up and down the TOC tree. Another version limits the tree to two levels, enhancing performance. The macros have nothing to do with tabs appearing in the sidebar (that is done with a special tag – see below).
So in whatever tiddler you would like the TOC to occur, per the instructions you put something like this at the top:
Except of course your “tag” would be whatever your top level tiddler in your TOC structure was.
Now if you add the tag $:/tags/SideBar to this tiddler, it will appear over in the sidebar. If you add a caption field to this tiddler, then the contents of the caption field will be the title that is shown over in the sidebar.
There are other tools in the Demo to allow you to add navigation within tiddlers that are part of the TOC. But you can read about them in the tutorial.
I do find the highlight feature confusing because it doesn’t get updated as you move around on open tiddlers. I would like to shut it off if possible. Do you know of any way to shut this feature off?
The feature I’m referring to is
track and highlight the TOC entry opened from table of contents or by navigation buttons
The navigation highlights as you navigate if you set up a TW-TOC template, and use the navigation footer to move between tiddlers.
@Mohammad describes how to do this, for instance, under the tab Two level hierarchical navigation
I guess the question is, which feature in TW-TOC did you need? If you don’t want the highlighting, and/or don’t need a limited two-level hierarchy, then maybe you actually just need the standard TOC macros? They’re already built into TW. There’s a variety of types to choose from. You can read about them here:
The main features I want is to be able to open and close each topic individually AND the ability to close all open topics by clicking a single button. I don’t think any of the built in TOC methods allows for both of these features. I do expect users to select fairly unrelated topics so the next / previous method would not be used much.
Edit, and scroll down to where class kk-toc-opened-item is defined, you can replace it with the following:
.kk-toc-opened-item{
text-decoration: none;
font-weight: 500;
color: #5778d8; ;
-webkit-user-select: inherit; /* Otherwise the draggable attribute makes links impossible to select */
-webkit-touch-callout: none; /* Prevents long presses from bringing up a link preview */}
When I said this was a hack, I’m referring to the color attribute, which you will have to change appropriately if you are not using the standard color palette. It should have worked to replace it with macro call <<tiddler-link-foreground>>, but that didn’t work and I didn’t want to spend hours to find out why.
The only minor issue is that the selected topic line remains highlighted (darker text). If that could be changed to not highlight it would be perfect but it’s 95% perfect as is. Do you know of a way to not set the highlight without spending much time on it?
Even with the highlight I am very happy with the result. Thank you so much for your help.
.kk-toc-opened-item{
text-decoration: none;
font-weight: normal;
color: #5778d8; ;
-webkit-user-select: inherit; /* Otherwise the draggable attribute makes links impossible to select */
-webkit-touch-callout: none; /* Prevents long presses from bringing up a link preview */}