I would like to surface headings from content in an "included page" into a table of contents. I tried "copy link to this heading" and then pasting the link onto text, but this did not create the result I wanted. (Ability to click on heading in the TOC to jump down to the section on the page).
AFAICT you can't add anchors into an included page. LMK if I can, or there's any other work-around.
Thank you!
Hi @[deleted]
You can simply put a heading in front of the include page macro to create a TOC entry for the included page.
/here be page include macro
(I admit, not the ideal solution as it effectively duplicates the title....)
HOWEVER :) A solution would be to use a TOC ZONE macro.
Deploy the TOC Zone macro and then put the page include macro inside.
(I admit, again, it's not ideal but it does offer 'shortcuts' to jump to the desired content). I'd experiment with the macro and page structure to get the desired layout.
For example... placing the ENTIRE content of the page within the TOC Zone macro...
What's interesting is that headings included in macros are normally displayed in the TOC but are not clickable. With page include, I can confirm that headings from the included page do not appear in the TOC.
We use Scroll Viewport to create our doc site and, as it doesn't rely on the Confluence TOC macro, it creates a TOC with fully clickable elements even if the original heading is within a macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.