# Table of contents in Export

**URL:** <https://community.silverfin.com/t/table-of-contents-in-export/1808>\
**Category:** Exports\
**Created:** [June 5, 2020, 6:59am UTC](https://community.silverfin.com/t/table-of-contents-in-export/1808 "2020-06-05T06:59:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![svalais](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/svalais/32/2422_2.png) [@svalais](https://community.silverfin.com/u/svalais)\
**Post date:** [June 5, 2020, 6:59am UTC](https://community.silverfin.com/t/table-of-contents-in-export/1808/1 "2020-06-05T06:59:38Z")

</div>

Hi,

The code uses to create our table of contents in the following:

"|–25%–|:-----|----:+  
|| **Inhoud** |

  
  
  

|–25%–|:-----|-----:+|{% for toc in export.toc %}{% assign title = toc.title %}{% assign prefix = title | slice: 0, 3 %}{{ t }}{% if prefix == “1.1” %}  
||  
||  
||  
||  
||\_ 1. Jaarrapport _|_ 3 _| {% endif %}{% if prefix == “2.1” %}  
||  
||  
||  
||  
||_ 2. Ontleding van de balans en resultatenrekening _|_ 10 _| {% elsif prefix == “4.x” %}{% unless shown\_main\_title\_4 %}{% assign shown\_main\_title\_4 = true %}  
||  
||  
||  
||  
||_ 4. Bijlage _|_ {{ toc.number | minus:1}} _|{% endunless %}{% assign nr\_3 = nr\_3 | plus:1 %}{% capture title %}4.{{ nr\_3 }} {{ title | slice: 3, 250 }}{% endcapture %}{% endif %}  
||  
||  
||  
||  
||_ {{ title }} _|_ {{ toc.number }} \_|{% endfor %}"

The result is:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/2/2133a09c1e73ed19a2129e671df341990e7f5c8b.png)

I made different changes in the code and this is the last result I have:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/f/f51dc55176d6caf1c4ad214d0efa975dceb044a8.png)

The problem here is that I don’t have a line for the titels 1., 2. and 4…

Can you help me?

Thanks a lot,

Sylvie

---

<div class="post-metadata">

**Author:** ![borjaGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/borjagonzalez/32/825_2.png) [@borjaGonzalez](https://community.silverfin.com/u/borjaGonzalez)\
**Post date:** [June 5, 2020, 8:01am UTC](https://community.silverfin.com/t/table-of-contents-in-export/1808/2 "2020-06-05T08:01:18Z")

</div>

Hi Sylvie,

Can you post here the latest code you have after you made those changes so that I can take a look?

Thanks,  
Borja

---

<div class="post-metadata">

**Author:** ![svalais](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/svalais/32/2422_2.png) [@svalais](https://community.silverfin.com/u/svalais)\
**Post date:** [June 5, 2020, 8:51am UTC](https://community.silverfin.com/t/table-of-contents-in-export/1808/3 "2020-06-05T08:51:52Z")

</div>

Hello,

This is my code with changes:

"|–25%–|:-----|----:+  
|| **Inhoud** |

  
  
  

|–25%–|:-----|-----:+|{% for toc in export.toc %}{% assign title = toc.title %}{% assign prefix = title | slice: 0, 3 %}{{ t }}{% if prefix == “1.1” %}  
||  
||  
||  
||  
|| 1. Jaarrapport | 3 | {% endif %}{% if prefix == “2.1” %}  
||  
||  
||  
||  
|| 2. Ontleding van de balans en resultatenrekening | 10 | {% elsif prefix == “4.x” %}{% unless shown\_main\_title\_4 %}{% assign shown\_main\_title\_4 = true %}  
||  
||  
||  
||  
|| 4. Bijlage | {{ toc.number | minus:1}} _|{% endunless %}{% assign nr\_3 = nr\_3 | plus:1 %}{% capture title %}4.{{ nr\_3 }} {{ title | slice: 3, 250 }}{% endcapture %}{% endif %}  
||  
||  
||  
||  
|| {{ title }} | {{ toc.number }} |  
||  
||  
||__|_ \_|  
||{% endfor %}"

Thanks,

Sylvie

---

<div class="post-metadata">

**Author:** ![borjaGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/borjagonzalez/32/825_2.png) [@borjaGonzalez](https://community.silverfin.com/u/borjaGonzalez)\
**Post date:** [June 5, 2020, 9:20am UTC](https://community.silverfin.com/t/table-of-contents-in-export/1808/4 "2020-06-05T09:20:25Z")

</div>

Thanks Sylvie,

To underline the main titles, you need to add the underscores next to them like in the example below:

```auto
||_ 1. Jaarrapport _|_ 3 _| 

```

Let me know if that works.

Best,  
Borja

---

<div class="post-metadata">

**Author:** ![JelleBe](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@JelleBe](https://community.silverfin.com/u/JelleBe)\
**Post date:** [February 6, 2026, 11:22am UTC](https://community.silverfin.com/t/table-of-contents-in-export/1808/5 "2026-02-06T11:22:29Z")

</div>

Hi!

When we try to incorporate an attachment in the export it always gets the name of ‘appendix 1: NAME OF TEMPLATE’ is there a possibility to show the name of the attachment instead? Is there somewhere an overview of all the possibilities the toc drop has?

Thanks!

Kind regards

Jelle
