$pages->append()
Appends an element to the data array
$pages->append(string|Kirby\Cms\Page ...$args): Kirby\Cms\Pages
Parameters
| Name | Type | Default |
|---|---|---|
| ...$args | stringorKirby\Cms\Page |
no default value |
Return type
This method modifies the existing $pages 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);
}