Skip to content

Kirby 3.9.8

$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);
}