$pages->append()
Appends an element to the data array
$pages->append(string|Kirby\Cms\Page ...$args): Kirby\Cms\Pages
Parameters
Name | Type | Default |
---|---|---|
...$args | string orKirby\Cms\Page |
no default value |
Return type
This method modifies the existing $
object it is applied to and returns it again.
Parent class
Kirby\Cms\Pages
inherited from Kirby\Cms\Collection
Examples
$collection = page('projects')->children()->limit(1);
foreach(page('projects')->children()->offset(1) as $key => $child) {
$collection->append($key, $child);
}