Create a collection of modular children in a module?

Hi
I’ve got a couple of modular pages and at the top of each one I’d like to a have a mini menu of anchor links to the different module sections.
On my page modular.twig.html I’ve got a page collection that works ok

<ul class="list-inline">              
   {% for page in page.collection %}
      <li class="sqr_button"><a href="#{{ page.slug }}">{{ page.header.title }}</a></li>
   {% endfor %}
</ul>

but when I moved this into a module I get no output.
So is it really late and I should have stopped working or this isn’t really possible inside a module?