Retro,

If you copy follow the existing table of contents macro you could make your 
own and insert code to detect a tag or field in any tiddler, and in your 
case place this in the "ST Heading" tiddler which instead calls the 
expandable macro.
 
$:/core/macros/toc

If I can I will try and build it but an idea would be to test the "root 
tag" tiddler for a toc-type field and use this to determine which toc 
method to use (Expandable or not), then for every tiddler in the tree look 
for the toc field and redirect the call according to this field.

Actually I will definitely build this solution, if not right away, as I see 
it forming a useful code pattern for a number of smart tools.

Regards
Tony


On Monday, September 3, 2018 at 9:27:50 AM UTC+10, retro_future wrote:
>
> So, I have a tagged setup like this:
>
> Main Topic
> - Sub-topic 1
> -- ST Heading
> ---- entry 1
> ---- entry 2
> ---- entry 3
> ---- entry 4
> -- ST Heading
> ---- reference a
> -- ST Heading
> ---- reference b
> ---- reference c
>
> The "main topic" tiddler's body is currently just a simple <<toc>> macro, 
> and in general, this works great. It's also a sidebar tab, so I usually 
> will have that open and click on a ST Heading then "create new tiddler 
> here" when I want to add a new entry. (This is important!)
>
> However, I'm adding about three new entries to one of the Sub-Topic 
> Headings every week so that particular section of the toc will be extremely 
> long eventually. What I want is to have a table of contents that looks like 
> this: 
>
> Main Topic
> - Sub-topic 1
> -> ST Heading
> -- ST Heading
> ---- reference a
> -- ST Heading
> ---- reference b
> ---- reference c
>
> So that *only *the sub-topic with the entries is expandable (& collapsed 
> by default), and I can continue to click on it and the other sub-topic 
> headings directly.
>
> toc-expandable doesn't work for me because it makes *everything *expandable 
> and that is an impediment to the "click on sub-topic heading, make new 
> tiddler here" workflow.
>
> Any thoughts or suggestions on how to do this?
>

-- 
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/37882fcc-e98e-4779-b27d-c2cfd8eaa9dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to