How to hide page-toc table of contents on a blog card?

Hello !
First of all, thank you to all the community for Grav. I’ve never created a website before, but the more I dig and the more I like this CMS ! :heart_eyes:

So, I’m stucked and cant’t find the solution to this. Hope you will understand :upside_down_face:

I use the page-toc plugin to have a table of contents just under the title and the content of my blog items (I have tried the Anchor plugin without success, I’m certainly too new to code)

Here is the part of my blog_item.html.twig

<header class="entry-header">
	<h1 class="entry-title">
		...
	</h1>
	{% if config.get('plugins.page-toc.active') or attribute(page.header, 'page-toc').active %}
		<div class="page-toc">
			{% set table_of_contents = toc(page.content, 2, 1) %}
			{% if table_of_contents is not empty %}
				<h4>Sommaire</h4>
				{{ table_of_contents|raw }}
			{% endif %}
		</div>
	{% endif %}
	
</header>

<div class="entry-content">
...
</div>

On my blog page i have some rows who show the blog items extracts (I’m using the Gateway template) and would like to display only the entry-title and the entry-content.

{% block content %}
<div class="row">
  <div id="primary" class="content-area">
       <div class="large-{% if not page.header.fullwidth %}8{% else %}12{% endif %} columns">
      <main id="main" class="site-main" role="main">
        {% for child in collection %}
        <div class="row">
          {% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
        </div>
        {% endfor %}
        {% if config.plugins.pagination.enabled and collection.params.pagination %}
        {% include 'partials/pagination.html.twig' with {'base_url': page.url, 'pagination':collection.params.pagination} %}
        {% endif %}
      </main>
    </div>
        ...
    </div>
</div>
{% endblock %}

Have i to modify something on the include function ?

Thank you !

I think I found it…

On the blog_item.html.twig, I have placed the page-toc code on a div under the header, with the condition {% if truncate is sameas(false) %} as bellow :

<div>
        {% if truncate is sameas(false) %}
            {% if config.get('plugins.page-toc.active') or attribute(page.header, 'page-toc').active %}
                <div class="page-toc">
                    {% set table_of_contents = toc(page.content, 2, 1) %}
                    {% if table_of_contents is not empty %}
                        <h4>Sommaire</h4>
                        {{ table_of_contents|raw }}
                    {% endif %}
                </div>
            {% endif %}
        {% endif %}
    </div>

It seems to work, I hope I didn’t do anything wrong :upside_down_face: