Table of contents in Export

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:

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

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

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

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

Thanks Sylvie,

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

||_ 1. Jaarrapport _|_ 3 _| 

Let me know if that works.

Best,
Borja