How to add an item to the table of contents? #7783
-
Hi, I have enabled Isso comments on my site. For pages that have comments enabled, I would like to include the heading I note the word The other headings have This is the code in
I'd be grateful if anyone could provide any suggestions. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Clearly, I was having trouble seeing the wood from the trees! It was right there in the
Mine now looks like:
I've since realised that the ID tag has nothing to do with what is shown in the table of contents. The ID tag is a formatted version of the text. i.e. a heading of Back to the drawing board... |
Beta Was this translation helpful? Give feedback.
-
Hello @woter1832, You should be able to modify it using a |
Beta Was this translation helpful? Give feedback.
A simple example without conditionals to limit it to the pages with comments, but should be enough to get you 80% there ✌️
EDIT:
Apart of the default suggestion to use a
comments
true/false
flag in the meta header and your addition below, there are also other conditionals you could want to use. Like thepage.file.src_uri.startswith("blog/posts")
which would include every post in the directory, or another option ispage.meta.template == "blog-post.html"
…