Page 1 of 1

Unlisted static page in menu

Posted: Sat May 11, 2019 2:06 pm
by arikenko
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

Re: Unlisted static page in menu

Posted: Mon May 13, 2019 11:04 am
by Edi
You can add an if condition with the slug of the page.