How to get the collection of pages from single .html?

In my theme layouts/projects I have both list.html and single.html. In content/projects I have project1.md project2.md project3.md etc.

In list.html I have {{range .Data.Pages}}…{{end}} and it gives me all the projects in the loop all right.

When I use the same code in the single.html I get nothing. When I changed .Data.Pages to .Site.Pages I got all the site pages in the loop. But I need only the projects, not all the pages. How can I display links to all my other projects from the page dedicated to one of them?

See:

That’s great! Thank you!

This topic was automatically closed after 22 hours. New replies are no longer allowed.