Say I’m building a submenu, where each item is a kirby-module, how would I access the title field of each module?
So far I can use
modulesList() and other helpers, but the best I reached was to get to the module object and output it as a string unfortunately.
My code is
<?php $sections = $pages->filterBy('template', 'section'); ?> <?php foreach($sections as $sec): ?> <?= $sec->?? ?> <?php endforeach ?>
I tried to get to the module page using
->grandChildren but without good results.
The example of printing single modules worked, but I need to only access a specific field for all pages meeting the criterias above.