Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,252
Community Members
 
Community Events
176
Community Groups

How do you make 2 column Table of Contents

Afternoon,

 

How do you make in a confluence page, a 2 column Table of Contents to save space. I understand we can split pages sections but I can't see a way to have a table of contents spread over to the space next to it which is empty.

2 answers

For Confluence Cloud 🙁

If the web address of your Confluence instance is something like https://yourcompanyname.atlassian.net, that means you are on Confluence Cloud and as a result you will not be able to do this.

For Confluence Server 🎉

Otherwise you are probably on Confluence Server, in which case, you can create your own user macro to achieve this.

Get an administrator to add the following user macro:

## Macro name: toc-2columns
## Macro title: Table of Contents in 2 Columns
## Macro has a body: No
## Developed by: David Simpson <community.atlassian.com@davidsimpson.me>
## Date created: 2020-03-16
## Installed by: Your Name
##
## @noparams

<div style="columns: 400px 2;">
<ac:structured-macro ac:name="toc" ac:schema-version="1" />
</div>

 This user macro simply adds some formatting around the Table of Contents macro to split it into 2 columns.

Hi David,
thank you very much for sharing the instruction. It works fine for me.

Could you please let me know what to add in the macro code for hiding heading 3 and below?

I tried the following taken from the default toc-macro code but it doesn't work ...

ac:data-macro-parameters="maxLevel=2"

Thanks a lot in advance!

Regards, Carina

I don't have Admin permissions, so the macro option was not viable for me. But, I was able to come up with a solution all the same. Please remember that a Table of Contents (ToC) is nothing more than a collection of links to fixed references on the page via Headers.

Here are the steps I used:

  1. Created a standard ToC to establish a list of links (this is the original Table of Contents).
  2. Created a table with the appropriate number of rows and columns desired for a split ToC (in this case; 4 columns with 3 rows).
    • The first row serves as a Title row.
    • The second row also serves as a Header row.
    • The third row serves as a Child Link row
  3. Merged all cells in the top row and entered the text: "Table of Contents" in the row.
  4. Pasted each H1 link into the cells on the second row (effectively serving as H1 section names and links to the H1 headers).
  5. Inserted the Expand macro into all cells on the third row 
  6. Pasted all child links below each H1 link into the Expand macro field on the last row.

The net effect was to have a split ToC that used the entire width of the page, with no white space. And, as a bonus, the bulk of the table was collapsible except for the Title and Header row (thanks to the Expand macro):


Table of Contents.png


Issues with this Solution:

  • The links are static, not dynamic
  • While the links can be edited, no new links will be added, nor will link changes in the original ToC be reflected
  • If you update any header information on the page, you will have to edit the link in the new table
  • The original ToC is dynamic and can be used for copying current links to the table

Tip!  You can insert the original Table of Contents inside the Expand macro to hide it.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events