How can I customise the CONTENT of the automatically generated TOC: Don't want page names but my own headings

Hello everyone,

in very short this is my question:
Is there a way to generate a table of contents (toc) and not use page names for this but something else (like my own headings)?

-----

In more detail:

I use Confluence to write technical documents and to export them to PDF. So controlling what the PDF output looks like is very important to me. As regards the automatically generated toc I fully understand how I can control its layout (with CSS) but I still haven't figured out how I can control its content, that is which content/information/headings become part of it.

When I use the PDF Export function I get a PDF with an automatically generated toc. The toc consists of the names of all the pages that I included in my PDF. Unfortunately these page names are not ideal for a toc. Because of their limitations (must be unique, must not include German umlaute, etc.) they typically read like this:

"name of the product - name of subcatogary A - name of function B - description"
"name of the product - name of subcatogary B - name of function C - installation"

So far what I do is opening the PDF in Acrobat PRO, going through the whole toc and change each single line from something like "name of the product - name of subcatogary A - name of function B - description" to something like "description". Afterwards I repeat the whole thing for other languages. Obviously this is a lot of unnecessary work. Finding a way to have my own headings included in the toc instead would solve all of this. So is there a way to do this?

What I am sort of looking for is some kind of script that controls all of this. Alternatively I would also be interested in workarounds or other solutions. Or perhpas I have gotten on the wrong track or am missing out something rather simple.

I am using Confluence 3.2.1.

I know the {toc} makro but can't see how it could help me since it is based on the headings of a single page. Also, I know plugins that allow alternative page names but would prefer a solution that also works for different languages.

3 answers

Okay, it seems my question is a little tricky. Perhaps I should to try to break it down a bit:

Can anyone explain to me how that table of contents is created that you get when you make an export via

Browse > Advanced > Export: PDF Export

Is it a plugin? Or some other kind of extension? Or some core functionality of confluence that cannot be touched?

As I explained before I appreciate having an automatic toc but I would like to adjust its appearance. Is there a way to do this?

I see that this was posted some time ago, but I'm also trying to customize the auto-generated TOC upon PDF export (Confluence 3.5). Maybe commenting will add some life to this question?

Good idea. It is still a topic for me as well.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

685 views 21 12
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