In Confluence versions 5.8 and later, Table of Contents macros are no longer rendered server-side anymore – meaning that we have to include a few resources in order to create a TOC.
For this to work, the script looks for all headings within an HTML element with the id "main-content". So make sure, that the element that wraps $page.content will have the ID.
<div id="main-content">
$page.content
</div>
CODE
You can add the following style to clean up the clutter generated by the macro for Viewport.
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: Click Here