HI everyone, Please I need help on how to exclude the home button from the navigation menu. I want the page to still be the home page but I want its button removed from the navigation menu.
Thanks
Since Kirby itself is just the underlaying structure of your website, we can’t tell, what frontend (website) and what parts of it are used. so no one can tell you any information or question regarding the front-end, unless you don’t tell us, what you are using.
Remember: frontend and backend are totaly twi different things in kirby
Hello John,
You should be able to ‘delist’ the home (or any) page from your navigation menu by setting the page ‘status’ directly from the panel/admin area (see screenshot).
I hope this helps.
Please post the code you use for your navigation menu. Without any context, it is difficult to give the correct advice.
<?php $items = $pages->listed(); if($items->count()): ?>
<ul class="f-header__list flex-grow flex-basis-0 justify-center@md">
<?php foreach ($items as $item): ?>
<li class="f-header__item" >
<a href="<?= $item->url() ?>" <?php e($item->isOpen(), ' aria-current="page" ') ?> class="f-header__link"><?= $item->title()->html() ?></a>
</li>
<?php endforeach ?>
</ul>
<?php endif ?>
Usually, the home folder is not a listed folder, so if it is part of the list, you have probably made it listed and should now
- either make it unlisted as proposed by @aoimedia (hello again, it’s been a while:wave:)
- or exclude it
$items = $pages->listed()->not('home');
thanks, it works