Sub page menu where pages are dynmic

I have about 2,000 of these pages. The thing is it’s a sub, sub, sub page.

I need a menu that will keep menu when they click on something like aircraft-configuration. All the options would say here as it switches to that page. For instance, this would be Air Canada Star Aliance. It would have information about the airline.

When they click on one of the sub pages. It needs to highlight and show the content to the right.

I don’t know how to do this.

Any thoughts?

Here’s my current code.

<div class="small-3 cbt-side-nav columns">
                    <?php foreach ($page->children() as $subpage):

                            <a href="<?php e($subpage->ext_url()->isNotEmpty(), $subpage->ext_url(), $subpage->url()) ?>" <?php e($subpage->ext_url()->isNotEmpty(), 'target="_blank"', '') ?>>
                                <?php echo html($subpage->title()) ?>
                    <?php endforeach ?>
            <div class="small-9 columns text2">

                <?php echo $page->text()->kirbytext() ?>

I’m currently calling any page, be it active or inactive.

It has to be something like, get page->parent echo pages parents children.

am going to experiment with

<a href="<?php echo $page->parent()->url() ?>">
  <?php echo html($page->parent()->title()) ?>


There is a function called isActive() if that’s what you’re looking for?

The previous one is right. Now i just need to echo out the kids.

I think you are right also, about the is active.

I’m trying to call the children of that returned value.

So I have

$getParent = $page->parent->url();

but now I need to get the children of that parent and return it.

any thoughts?


The children of the parent are called siblings. There’s a function siblings() that’s perfect for that :wink: