$page->siblings($self = true)

Returns all siblings.

  • $self (boolean)
    Whether or not to include the current page in the collection
  • return ($pages)

Example

<?php
$siblings = $page->siblings();
foreach($siblings as $sibling): ?>
  <h1><?= $sibling->title()->html() ?></h1>
<?php endforeach ?>

Is something missing or incorrect? Edit this page on Github…