In a template, creating a collection for a list of other pages

I am looking at the user guide for theme variables
and also the API for Pages

I am not quite sure how to use this to get the children of a page I am not currently on

For example, I am trying

{% set otherpages = pages.children("/someotherpage") %}

but otherpages just gives me the pages at the root of the document. How exactly do I get children for another page.

Given a dir structure like:

mysite/
  users/
    pages/
     01.home/
         default.md 
     02.someotherpage/
         default.md
         pageA/
           default.md
         pageB/
           default.md

how do i get a listening of the child pages of someotherpage

This is to create a list of certain sub-pages.

You’re looking for page.find(ROUTE).children docs.

Excellent! Exactly what I needed. It seems I went looking everywhere else except the first page. I am not yet sure what works in the API versus templates and how they all work together. I think tracing this function back through will help me better understand.

It takes some digging to figure it all out. The page variable gives you access to the Page object for that page.