Suppress display of TOC in a single article?
-
Hit enter too soon :-)
I wanted to ask whether it's possible to suppress display of the TOC in a single article?
We're using the Help Center Theme and have one article which is a kind of extended glossary, we're using the excerpt/excerpt include macros to pull together info from 19 articles and the TOC becomes very loooong. Alternative, we would like to display only Heading 1s for that specific article.Thanks,
Dorte -
Hi Dorte,
you can suppress the ToC in one article by using custom CSS.
The <body> in the HTML contains the pageid attribute which makes it possible with CSS to apply rules for specific pages. The class for the <div> element which contains the ToC is called ".article__toc".
To suppress the ToC for a single page you can do something like this:body[pageid="<thePageId>"] .article__toc > div {
display: none;
}I hope this helps.
Cheers,
Steffen
Please sign in to leave a comment.
Comments
3 comments