$file->siblings()
Returns all sibling elements
$file->siblings(bool $self = true): Kirby\Cms\Files
Parameters
Name | Type | Default |
---|---|---|
$self | bool |
true
|
Return type
This method modifies the existing $file
object it is applied to and returns it again.
Parent class
Examples
if ($file = $page->file()) {
foreach($file->siblings() as $sibling):
echo $sibling->html();
endforeach;
}