Probably depends on what version of Confluence you're using, and probably not very simply or easily unless you're happy fiddling around with the files that make up the documentation theme.
Having said all that, I'm just guessing but this might work for 3.x - have a look at the pagetree2 macro from Adaptavist - https://www.adaptavist.com/display/Builder/pagetree2+macro.
Another week, another Topic Tuesday! Agile has been on my mind a lot lately because I've seen good implementations and bad implementations, but now as a Jira admin it matters more to me whether...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events