Skip to content

Kirby 4.4.1

$pages->append()

Appends an element to the data array

$pages->append(mixed ...$args = null): Kirby\Cms\Collection

Parameters

Name Type Default
... $args mixed null

Return type

Kirby\Cms\Collection

Parent class

Kirby\Cms\Pages inherited from Kirby\Cms\Collection

Example

$collection = page('projects')->children()->limit(1);

foreach(page('projects')->children()->offset(1) as $key => $child) {
  $collection->append($key, $child);
}