Skip to content

Kirby 3.5.7.1

$file->siblings()

Returns all sibling elements

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

Parameters

Name Type Default
$self bool true

Return type

Kirby\Cms\Collection

Parent class

Kirby\Cms\File

Example

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