Making {toc} macro links heading size

Hello!

I was wondering if anyone knew if it is possible to make the links in a table of contents the size of headers? For example, we have an instance where a user would like to make a table of contents list the size of Heading 3.

If anyone has a trick to doing this I would really appreciate it!


Thank you!

Jennifer

2 answers

1 accepted

This widget could not be displayed.

Thank you for the above answer. I probably should have mentioned we were using Confluence 4.3. Since we have the source editor plugin installed, I was able to make the table of contents a heading by editing the storage format with something like:

<h5><ac:macro ac:name="toc">
<ac:parameter ac:name="maxLevel">5</ac:parameter>
<ac:parameter ac:name="type">flat</ac:parameter>
<ac:parameter ac:name="separator">pipe</ac:parameter>
</ac:macro>
</h5>

This widget could not be displayed.

This is a touch complicated because the div that contains the TOC doesn't have a class or ID. So, give it one.

Put in a div macro. Give it a class name, such as "toc".

Put the TOC macro inside that div.

Add a CSS stylesheet macro, and put in your styling info, such as this:

.toc div ul li{font-size:18pt;font-weight:bold;line-height:24pt}

You'll need to play around with the settings to get exactly what you want.

FYI -- it is really helpful (maybe necessary for this kind of thing) to have something like Firebug or the equivalent so you can see the CSS settings.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

462 views 6 6
Join discussion

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