Thanks for the advice, but the suggested code only ended up listing all subpages if you were already on a subpage. If you are on a top level page, no links appear.
I am trying to make the function recursive, with two loops…one for all top-level pages, and another one that interrupts to check for children. If there are children, the inner loop creates a list of them. The end result should look like:
<ul>
<li>Top-Level Page 2 (Current Page)</li>
<li>Current Page Child Page 1</li>
Current Page Child Page 2
</ul>
Top-Level Page 3
<li>Top-Level Page ...</li>
In all cases, I would like the top-level pages to appear, and only the child pages for the current page. Such a seemingly simple problem is giving me quite a headache!
Thanks to all who will offer help.