Reference

$file->siblings()

Returns all sibling elements

$file->siblings(bool $self = true): Collection

Parameters

Name Type Default Description
$self bool true

Return type

Collection

Example

if($file = $page->file()) {
    foreach($file->siblings() as $sibling):
        echo $sibling->html();
    endforeach;
}

Source code

kirby/src/Cms/HasSiblings.php#L73