Table of contents not working in view mode

Brian Bolger October 11, 2024

When using table of contents it does not link to heading level 2 and 3 only level 1. But in edit mode it does work for all levels. No idea why this is not working in view mode.

3 answers

2 votes
Kristian Klima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 11, 2024

@Brian Bolger 

The TOC macro, that shows headings on a single page, has settings where you can determine which levels are shown. 

2024-10-11_14-37-58.png

 

The Child pages macro, that shows the pages organize under the parent page in the left navigation tree, has a similar setting:

2024-10-11_14-40-06.png

 

The defaults are different - child pages shows level one only by default, TOC shows all headings on the page by default.

0 votes
Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2024

@Brian Bolger Welcome to the Atlassian Community.

Since you are on Cloud, I wanted to provide the link to the Cloud documentation for the Table of Contents macro: https://support.atlassian.com/confluence-cloud/docs/insert-the-table-of-contents-macro/ 

Since it is showing all the headings you want in edit mode, though, but not in view mode, the only thing I can think of is that maybe you have Closed the draft page to return to view mode, rather than publishing (Update button) the page. You don't see the changes you've made in view mode until you publish the page.

In view mode, if you see Unpublished Changes at the end of the page breadcrumb at the top of the page, this indicates that you haven't published the latest changes.

0 votes
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2024

Hi @Brian Bolger 

Can you please take a look at this post and confirm once it is all the same at your end right ?

Solved: Why i can't make the 'Table of Contents' (atlassian.com)

[CONFCLOUD-67967] Using page preview does not render Table of Contents macro - Create and track feature requests for Atlassian products.

 

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

Brian Bolger October 11, 2024

No, these articles are about the table of contents macro not displaying in preview. I have the table of contents displayed but when editing the links to the sections work for all levels but when viewing the page, only the heading 1 sections are able to be linked to but not the other heading sections.

Like Humashankar VJ likes this
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2024

Hi @Brian Bolger 

Thank you for providing additional context. Your response accurately highlighted the discrepancy between edit and view modes, specifically with linking to heading levels 2 and 3. Can you please give a try with the below steps and see the outcome:

Table of Contents Macro | Confluence Data Center 9.1 | Atlassian Documentation

Check Macro Settings by verifying the TOC macro's "Minimum heading level" and "Maximum heading level" are set to include desired levels (e.g. 1-3).

Save and re-publish after adjusting macro settings to resolve potential display issues.

Double check proper heading hierarchy (H1 > H2 > H3) and reassign styles manually, addressing potential invisible attribute issues - Table of content Macro not working. (atlassian.com)

 

Regards

Brian Bolger October 11, 2024

Checked all of the above, still unsure why edit everything works fine but view not working. More context to the page setup, the heading being linked are within a table. So again not sure why edit mode the linking works fine,I can select any level section and redirect to the section but view it is not redirecting to the heading 2 and 3 content only level 1 section is redirected to.

Brian Bolger October 11, 2024

I think I see where the issue is now, the issue is that if you are using the Table Toolbox macro and within the table it contains headings that are not linking only in view mode. Still in edit mode it is redirecting to those headings.

If I create a table without that table toolbox macro then the redirecting works fine in view and edit. 

So seems to be defect in that macro and how it is handled for the table of contents. The reason I figured this out is in view mode, when you hover over a section where it is redirecting from table of contents, I noticed there is a "copy link to heading" icon shown but in the toolbox table headings those were not present. So it appears to be an issue, as I don't see any documentation stating this is not supported. 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events