mardi 2 mars 2021

Two Level Menus in Hugo

I want to create a site with deep menus using Hugo. I want the ability to make child items parents to new lower-level items. I tried using this site's tutorial. https://codingnconcepts.com/hugo/nested-menu-hugo/

I am able to create one-level submenus, but I want a logic system that I can continue to create subpages with automatically.

<nav class="nav">
    <ul class="menu">
        
        <li class="active">
            <span></span>
            
            <span class="drop-icon" for="">▾</span>
            <ul class="sub-menu">
                
                <li class="active">
                    <span></span>
                </li>
                
            </ul>
           
        </li>
        
    </ul>
</nav>

This sample above creates one submenu, but I can't figure out how to make two levels work.




Aucun commentaire:

Enregistrer un commentaire