Unlisted static page in menu

Post Reply
arikenko
Jr. Bludit
Posts: 6
Joined: Sun May 05, 2019 2:49 pm

Hello,
how to make a page or a subpage unlisted in menu ?
I have something like that in my topbar.php :

Code: Select all

<!-- Static pages -->
<?php foreach ($staticContent as $staticPage): ?>
<li class="nav-item <?php echo (($url->slug()==$staticPage->slug())?'active':'') ?>">
<a class="nav-link" href="<?php echo $staticPage->permalink(); ?>"><?php echo $staticPage->title(); ?></a>
</li>
<?php endforeach ?>
The idea is to create a subpage that is not visible in the menu.

Cheers
Ari
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

You can add an if condition with the slug of the page.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply