Hi,
i try get content of children of two different pages…
<?php foreach($page->siblings()->find('subpage-a')->children()->limit(3)->shuffle() as $subpage): ?>
does that for one page… But how can i expand that, to get results of “subpage-b” at the same time?
You can do something like this.
You should also do the shuffle first before you limit the collection to 3.
$siblings = $page->siblings();
$collection= new Pages();
$collection->add($siblings->find('subpage-a')->children());
$collection->add($siblings->find('subpage-b')->children());
foreach($collection->shuffle()->limit(3) as $subpage):
// do stuff
endforeach;
Thanks a lot, that works!! Fantastic 