$pages->merge()
Include all given items in the collection
$pages->merge(Kirby\Cms\Pages|Kirby\Cms\Page|array|string ...$args): Kirby\Cms\Pages
Parameters
| Name | Type | Default |
|---|---|---|
| ...$args | Kirby\Cms\PagesorKirby\Cms\Pageorarrayorstring |
no default value |
Return types
This method does not modify the existing $pages object but returns a new object with the changes applied. Learn more →
Parent class
Examples
$collection1 = page('exhibitions')->children()->listed();
$collection2 = page('news')->children()->listed();
$newCollection = $collection1->merge($collection2);