Skip to main content

How do I remove the Table of Contents? (SAP KC)

This article explains how you can remove the Table of Contents (TOC) from an individual page. 

What is the Table of Contents (TOC)?

The Table of Contents (TOC) is an automatically generated list of all the Headings (H1, H2, etc.) on an individual MindTouch article.  The TOC is used on an article to quick skip down the page to a specific heading.  The TOC also highlights the page structure by indenting nested headings (i.e. H2 is indented under a H1). 

You should be able to see the TOC on this page in the top-right corner.  If you cannot see the TOC on this page, please take a look at the following image:

How does the TOC work with the Article Type?

The TOC can be added to a page by changing the Article Type to either How-To, Reference or Topic.  If you select a different Article Type such as Not-Set, the TOC will not display.  

In some cases, however,  you will need to keep the correct Article Type to properly leverage the MindTouch content structure framework but still wish to hide the TOC.  In this case, you may have an Article Type of How-To, Reference or Topic and use CSS to hide the TOC. 

Hiding the TOC using CSS

To hide the TOC with CSS you will need to use the following instructions. This will only work if you are an admin because CSS is unsafe content:

  1. Go to the page with the TOC and click Edit Page
  2. In the editor, Click the Styles dropdown and select CSS
    • Tip: This will add a purple CSS box to the page, it is only visible to your authors
  3. Add the following CSS to the purple CSS box:
#page-top #pageToc {
    display: none;

Can I hide parts of the TOC?

Yes, in some situations you may want to use the Table of Contents but only show certain Headers.  This may be the case if you have a very long article that has a lot of headers.  It also may be the case, given your content, that the lower level headers (H4 or H5) are not necessary in the TOC.  

Please remember that you can apply CSS an individual page or site-wide.  If you want to make this change to your entire site, please apply the CSS to Control Panel > Custom Site CSS.

/* HIDE H3, H4 & H5 FROM TOC */
#pageToc li li li {
/* HIDE H4 & H5 FROM TOC */
#pageToc li li li li {
#pageToc li li li li li {