Basically, I have a very large document (page) and instead of displaying its table of contents at the top of the page, I want to display a navigation tree in the left side bar based on the same criteria that generates the table of contents within the page (for example, if it finds a heading 1 then it adds to the tree).
But I want this to be in the left side panel without creating a page for each heading.
Is this possible?
Hello,
You can add TOC macro to your sidebar same way you would to your page, but using Markdown language.
For the example below, I went Space Tools > Look and Feel > Sidebar, header and footer and added the following markup to Sidebar section
{toc:style=none|outline=true|indent=10px|absoluteUrl=true|maxLevel=3}
It created TOC in the sidebar for the page that is currently open. From the language:
Any other parameters can be added by referencing Table of Contents Macro page.
So my final result was a table of contents shown in the sidebar. Every time I switch a page, TOC for that page will be displayed.
It would probably be worth creating a user macro to add some styling and javascript to make the TOC expandable
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Igor,
Thank you for your suggestion. It does add the type of TOC we want to the sidebar, but whenever you click one of the links (in this TOC), it refreshes the whole page, collapses the new TOC, and the focus goes back to the document link (rather than the section where we're trying to link to.)
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to try this, but there no longer appears to be a sidebar section Confluence Cloud 1000.0.0-da503df1a09f.
I tried Space Settings > Look and feel > Page layout, but only Header and Footer sections exist under Page layout. Then I searched in Jump to setting... and found Space Settings > Manage Space > Edit sidebar, but there are only two toggle buttons for Overview and Blog and no section to enter markup.
How do I add the TOC to the Sidebar in Confluence Cloud 1000.0.0-da503df1a09f?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another approach might be to make use of sticky table headers, by putting the TOC in the table header and the content in the table rows beneath, then use the flat list option in the TOC macro. However, this will only work in certain scenarios.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.