Hi,
I watched this video https://www.youtube.com/watch?v=bmz6NYUNWPk and I must say that it help me learn how to create the navigation menu. However, I would like to be able to filter the submenu to display certain items. This is the code:
<nav class="desktop-navigation">
<ul>
<li>
<a href="#">Home</a>
<ul class="dropdown">
<?php foreach ($site->children() as $item): ?>
<li><a href="<?= $item->url() ?>"><?= $item->title() ?></a></li>
<?php endforeach ?>
</ul>
</li>
<?php foreach ($site->children()->listed() as $item): ?>
<li><a href="<?= $item->url() ?>"><?= $item->title() ?></a></li>
<?php endforeach ?>
</ul>
</nav>
</div>
The sub menu displays folders that exist inside the content folder such as kontakt, error, about, images, etc. which should not be showing in the sub menu. Grateful for your support.