Bulk apply ToCs by category/tag

Hi there, I wonder if there is a way to bulk apply the TOC to topics? We just installed the TOC component recently and now having to manually apply it to old topics is a bit tedious :smiling_face_with_tear:

3 Likes

Iā€™ll double-check, but I donā€™t think thatā€™s currently possible? Though I do sympathise with the manual edits. :slight_smile: How many have you got left to do?

3 Likes

I donā€™t think we have a whole lot of them at the moment, though itā€™d be great if the team could consider implementing this feature in a future release :crossed_fingers:

2 Likes

It was such a great idea @albert_vu that itā€™s now been added: :slightly_smiling_face::+1:

13 Likes

Great :smile: so I guess that Iā€™d need to update the theme-component from my end?

2 Likes

If you check, Iā€™ll think youā€™ll find itā€™s already been done. :slightly_smiling_face::+1:

But for anyone else wanting the swish new functionality, you can update the theme component from its customise page:

2 Likes

Hmmm, just thought of a scenario where a user doesnā€™t want to have a TOC in their topic, is there a way to revert that? :thinking:

1 Like

I like the tag element of it, so you could have a specific tag for TOC, and then remove it again if one is not desired?

2 Likes

I love the idea of automation, almost everytime and everywhere.

I havenā€™t updated DiscoTOC yet, but if it can take away option to insert TOC from toolbar when TOC comes from category it would be really nice touch. Like cherry top of the cake :wink:

Or, do opposite thing what @albert_vu asked ā€” there would be an option insert something like !toc if you understand what Iā€™m meaning.

For ordinary users it could be confusing, though.

I can live with that but TOC is quite unneeded when there is somethng like only one or two headers. Because when there is a TOC a long post must be scrolled to bottom to find outā€¦ what is it in discourse-lingoā€¦ well, possibility to scroll dates. But that is quite rare edge case I reckon.

5 Likes

Thereā€™s the theme setting TOC min heading (default 3) that can help with that. :+1: That would suppress the ToC for any topic that didnā€™t meet the minimum.

2 Likes