TOC on every page by default

Wanted to add this capability for those out there looking to unify page layouts within a space:

Goal here was to have a table of contents on every page in a given space, but this could be used to render any macro on pages in a given space.

* Navigate to a space, Browse > Space Admin

* In the Look & Feel Section > Layouts

* Page Layouts > Create custom

In velocity templates, you can call a Confluence macro using notation like this:


Depending on where you want this to render determines where you place it. In my case, I wanted the toc to render above the main content section, so I put this after the metadata section but above the main-content section.

Hope this helps!

3 answers

1 accepted

This widget could not be displayed.

answered to close this out.

This widget could not be displayed.

This might be a good "how to" article in the Confluence Knowledge Base space too.

This widget could not be displayed.

But it doesn't work if you try to add it to all pages, see bug

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published yesterday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

33 views 5 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you