How to add a cover page, generate a table of contents, adjust header styles and other settingsword-template-exporter-confluence confluence word help
This post goes over the more advanced options of the Word Template Exporter for Confluence add-on.
Add a cover page to your template
By default, the exporter will automatically replace all content from the template with the content from Confluence. If your template has a title page that you would like to include in the export, then enable the
Use the first page of the template as cover page option. With this option checked, the exporter will keep the first page of the document. The Confluence content will be inserted after the first page break. You can also make use of fields such as the title. The exporter will replace it with the title of the Confluence page.
Add a generated table of contents section
This option allows you to add a generated table of contents section to the exported document. Please note that page numbers are not automatically added yet. However, you can easily update numbers within Word after the page was exported. Simply click on the table of contents section and select
Update table. The table is based on the structure of the document, which is based on the Confluence Heading styles. Keep this in mind when reading about the next option.
Use header styles for child pages based on page tree
First some background: When exporting content, the exporter maps the heading and other styles from Confluence to Word. For example text formatted as
Heading 3 in Confluence will be exported as a
Heading 3 Word style.
When you select to export only a single page, then this mapping is straight forward. However, when you select to export
This page and all its child pages, then the page title of each page is added to the export as a
Heading 1. And of course, pages themselves typically define their own headings. Here it often makes sense to preserve the page hierarchy/tree. And this is exactly what this option does. When enabled, headings in the document will be adjusted based on the position of the page in the page tree. The outline/structure of your Word document will then match with the page tree in Confluence.
Here’s an example page tree:
Let’s take a look at the
Advanced export options page. It’s a child page under the
Getting Started page, which itself is also nested under the
Welcome ... page.
Without this option enabled, heading styles will be mapped one-to-one without considering the page tree. Here’s the result when exporting the
Welcome ... page including child pages:
And now let’s run the export again, but this time with the
Use header styles for child pages based on page tree option enabled:
As you can see, now the page Structure in Word matches with the page structure in Confluence.
Use fixed table widths
This option applies to all tables. By default table widths are set to auto-sizing. Some Word processors might not yet support this setting and may render the tables wrong. With this option, all table columns will instead get the same width depending on the document width. This option is only recommended if the default (not checked) produces undesired results.