Kirby Modules 2.2.0
Thanks to @pedroborges you can now use the modules()
method in two different ways:
- Iterate over the modules collection
<?php foreach($page->modules() as $module): ?>
<!-- Do something with the module -->
<?php endforeach ?>
- Return all the modules like you can also do with
renderModules()
<?= $page->modules() ?>