$page->siblings()
Returns all sibling elements
$page->siblings(bool $self = true): Kirby\Cms\Pages
Parameters
Name | Type | Default |
---|---|---|
$self | bool |
true
|
Return type
This method modifies the existing $page
object it is applied to and returns it again.
Parent class
Examples
<?php
$siblings = $page->siblings();
foreach($siblings as $sibling):
?>
<h1><?= $sibling->title()->html() ?></h1>
<?php endforeach ?>