@self.children won't display

Hi all !
I’ve just installed grav with learn2 theme and it’s just great !
I’d like to add to a chapter page the list of all the children pages (with link) to make sort of a table of content…
Here’s my page :

title: Achats
process:
markdown: true
twig: true
taxonomy:
category:
- chapter
content:
items: ‘@self.children

Do I miss something ?
Btw, I can’t understand the difference of page types (chapter, docs, …)… myabe connected to my pb ?
Best regards !
JMarc

In the future, please paste code between --- here in the forum, so the spacing is maintained. As spacing is critical in YAML, it can make a huge difference in outcomes.

Anyway, setting up the content.items in the page header, that page.collection() variable should be available in the Twig template. You should be able to iterate over it. However, remember @self.children only retrieves the first level of pages under this page you define the collection on.

Thanks for your answer, and sorry for the wrong display :

title: Achats
process:
    markdown: true
    twig: true
taxonomy:
    category:
        - chapter
content:
    items: '@self.children'

I actually have 2 children pages, but nothing appears on this page.It seems code is OK ?
Maybe the twig template doesn’t take that in account. I’ll check.

Ok that’s it : a template issue.
I’ve added :

{% for child in page.collection %}

{{child.title}}

{% endfor %}

in the chapter.html.twig of my theme templates, and all is fine.
Best !
JMarc

glad you got it sorted.

Btw, no way to indicate “Resolved” on my topic ?

Nope, unfortunately it’s a limitation of this forum platform.