List all pages in site

Hello again. I need to create a formatted “Site List” page for my site. This would be a hierarchical listing of all pages on the site. I’m guessing that this is the sort of thing that someone else would have already created. Any leads on where I can go to “borrow” some ideas / code?

There’s a couple of places you can look for examples of this. But the simplest example is probably the Antimatter theme as that has logic to navigate over all pages to build the menu. This makes use of a macro to support the multiple nested levels:

Another option is to look at the the sitemap plugin that loops over all pages:

rhukster: Thanks for your response. It looks as though the macro approach in the navigation.html.twig template is exactly what is required. I’ll give it a whirl tomorrow.