this is probably a more general PHP question.
I have two pages in kirby (experiments and thoughts). I would like to show (and mix) articles from both of them on one page.
right now I have a loop like this:
<?php foreach (page('/experiments)->children()->visible()->filterBy('date','<=',time())->sortBy('date','desc')->limit(2) as $p): ?>
How would I extend this to contain subpages from both streams? I tried array_merge until now. However without success.
This is beautiful. I love this!
Is there a way to query within the loop which collection each $p comes from easily by inserting a CSS class, or something?
Well, you can get the original collection if you merge collections, but in the above example, each collection derives from the same parent, so each page has a parent that is equivalent to its original collection.