Skip to content

after update: toc(page.content) returns empty #22

Description

@skinofthesoul

I just ran a bunch of updates on one site where I use this plugin. The table of contents didn't show up any more, and after some digging now I found out that toc(page.content) simply returns empty. I have no idea why, I already took other plugins out of the equation. What could be the issue here?

I put this bit in my base.html.twig template (and it used to work like this):
{% set table_of_contents = toc(page.content) %}
{% if table_of_contents is not empty %}
<h2 id="headline-toc">Auf dieser Seite:</h2>
{{ table_of_contents|raw }}
{% endif %}

Many thanks for your help!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions