How to create a sub menu

Hi.

Maybe a noob question, but are their way to make a sub-menu.??

Example:

If I have a menu option, called links - and want a drop-down LINK1, LINK2, LINK3, LIKE4

My site: https://www.halfdaner.dk
Running the lastes version of ghost!

Kind regards

Thomas

1 Like

As suggested in this picture below, the nav bar is automatically generated from within ghost
image

An unordered list has class="nav" role="menu" and a list item has class="nav-xxxx".

So you would need to create them manually in your ghost theme. In the standard Casper Ghost theme, you would find the right file under partials/site-nav.hbs and line 10 is where the nav bar is inserted. Maybe you could, under that, create a similarly structure for a dropdown menu.

So, for each item, you would need to have created a page, but without displaying that page in the menu — which I don’t know exactly how works.

{{#if @blog.navigation}}
    {{navigation}}
{{/if}}
<ul class="nav" role="menu">
    <li class="nav-xxxx">thing</li>
    <li class="nav-xxxx">thing</li>
    <li class="nav-xxxx">thing</li>
</ul>

You would need to do some css to get it to be an actual dropdown menu, but that is easily available elsewhere on the internet :slight_smile:

Hi :slight_smile:

I will try to fix it by myself… :slight_smile: - You definitely send me ind the right direction

Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.