Table Of Contents Text


I would like to get rid of the ‘biljage 1 voor’ in the table of content:

But i cannot edit this ?

Hi @Thijs ,

The table of contents is, to be honest, very limited of options.

So you just want to remove any annex then, if I understand it correctly?

Hi Sven,

That is indeed correct!

Okay @Thijs,

Keep in mind options are pretty limited but here it goes :

This is he code in the background we use to generate the table of contents :


|----|----:+{% for toc in export.toc %}
|[{{ toc.title }}](#{{toc.anchor}}) | [{{ toc.number }}](#{{toc.anchor}}){% endfor %}  

Pretty basic. So if you don’t want any annexes to appear ( “Bijlages” in a Dutch export ), you could try something like :


{% stripnewlines %}
{% for toc in export.toc %}
{% unless toc.title contains "Bijlage" %}
{% newline %}
|[{{ toc.title }}](#{{toc.anchor}}) 
| [{{ toc.number }}](#{{toc.anchor}})
{% endunless %}
{% endfor %}
{% endstripnewlines %} 

So any toc.title that has “Bijlage” in its name, will not be executed.

Care to give it a go? Let us know if it works

Worked great!

How can i add the points under each line?

Because now I’m getting this:

Well @Thijs,

That is one of the limitations.

If you don’t use tempered code for the table of content, you’ll get that display.
If you do use tempered code, that will be gone and there’s no option to get that.

You could however use :

{% newline %}
|_   [{{ toc.title }}](#{{toc.anchor}})  _
|_ [{{ toc.number }}](#{{toc.anchor}})  _ 

to underline each new category. But that’s all I’m afraid