How do you include Static Content in the TOC in Scroll PDF Exporter?

Is there a way to include static content in the table of contents in Scroll PDF Exporter?

The current scenario that I have is as follows:

  1. A new Content tab has been added in Static Pages (which has the Before Content and After Content sections). This tab is placed after the TOC tab.
  2. A specific page has been included in the Before Content section, with the following code:

    $include.getPage(<PAGE_TITLE>)
  3. In the TOC tab, I currently have the following content:

    <h1>Contents</h1>
    $toc

Any suggestions as to how the <PAGE_TITLE> page can be incorporated into the table of contents is very much appreciated.

1 answer

1 accepted

This widget could not be displayed.

Hi Ana,

you can add arbitrary elements to the toc by using this replacement:

${toc.addTocEntry("<THE_TOC_LABEL>")}

The replacement generates an ID which must be added to an HTML element where the link in the toc should point to.

For example:

&lt;h1 id="${toc.addTocEntry("My included page")}"&gt;My included page&lt;/h1&gt;

Hope this helps,
Jens

Thanks for the reply Jens, and apologies for the late reply. I will try out your suggestion, and will get back to you on how I go.

Hi Jens,

I tried your suggestion as follows:

<p id=${toc.addTocEntry("<THE_TOC_LABEL>")}></p>

...and it worked perfectly well!

Thanks again!

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 Jul 25, 2018 in Marketplace Apps

Jira Cloud and Bitbucket Cloud Integration with Microsoft Teams

One of the newest products in the Microsoft family - Microsoft Teams,  is a chat-based hub for teamwork that integrates all the people, content, and tools your team needs to be more engaged and ...

733 views 0 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