Closed DarkLite25 closed 2 years ago
You could use $site->findPage()
to get the page wanted and then use the children()
method, like this:
$site->findPage('route/to/specific/page')->children();
Then you can display children pages with a foreach
loop:
<?php foreach ($site->findPage('route/to/specific/page')->children() as $childPage): ?>
<article>
<h1><a href="<?= $childPage->uri() ?>"><?= $childPage->title() ?></a></h1>
<?= $childPage->content() ?>
</article>
<?php endforeach; ?>
I hope you find this information useful.
thanks it worked
how we can get children/descendants pages from specific page and display it ??