Add option to remove or keep the Contents box when exporting a page from a template as a PDF

Currently, a Simple Page, Encyclopedia, Article, Meeting notes page template includes a Contents box (a TOC). When exporting such a page as a PDF, you are given the option to include a TOC, you include it, but then, the Contents box in the exported file will also be included, causing a duplication in this way.

Would it be possible to include an option when exporting such a page type (coming from a template including a Contents box) to remove or keep the Contents box, perhaps like a checkbox in the PDF export dialogue?

These 2 situations are to be considered:

  1. If the user doesn’t check the TOC option when exporting to PDF, they may want to include the TOC from the page - the Contents box
  2. If you include more than one page in the PDF export then the TOC option shows the TOC for all pages and thus it’s not a duplicate anymore

Hi @AChirica I think you’ve already created a jira issue for this no? I remember already providing an answer somewhere about this :slight_smile:

ok i’ve found it at Loading...

You can check my answer at Loading...

I still believe that the best answer is to use the following in the content in your wiki:

(% class="hidden-print" %)(((
{{box cssClass="floatinginfobox" title="**Contents**"}}
{{toc/}}
{{/box}}
)))

What I’m not sure of is whether we want that to be by default in the XS pages having a TOC macro. I’m not fully against it but not sure if it would do more good than harm.

Thanks

I’m not sure either, and I’m also not sure that it’s worth exposing such a configuration when you can do it from wiki syntax.