Need help with sub menus and add classes
- This topic has 1 reply, 1 voice, and was last updated 5 months, 1 week ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- September 26, 2020 at 9:32 pm#3890
nicholasoneil
Hi, it may be too complicated, but I am trying to figure out how I can implenment this block of code into Publii’s sub menus. I understand how to create the basic Publii menu, but these sub menus with the classes I have in my HTML are confusing me. Is there any way to do this?
<ul class="nav navbar-nav"> <li class="nav-item"> Home <li class="nav-item dropdown"> Start Here <li class="nav-item">Sermons <li class="nav-item">Events <li class="nav-item">Contact
and
{{#unless level}} <nav> {{/unless}} <ul{{#if level}} class="submenu submenu-level-{{level}}"{{else}} class="menu menu-level-1"{{/if}}> {{#each items}} <li{{menuItemClasses}}> {{#if link}} {{label}} {{else}} <span{{#if title}} title="{{title}}"{{/if}}>{{label}}</span> {{/if}} {{#if items}} {{> menu}} {{/if}} {{/each}} {{#unless level}} </nav> {{/unless}}
Thank you,
Nick
October 2, 2020 at 11:12 pm#3947nicholasoneil
Hi, I’d like to try to set it up like this:
{{#unless level}} <nav> {{/unless}} <ul class="nav navbar-nav"> {{#each items}} <li class="nav-item"> {{#if link}} {{label}} {{/if}} {{#if items}} <li class="nav-item dropdown"> {{label}}
{{#each items}} {{#if link}} {{label}} {{/if}} {{/each}}{{/if}} {{/each}} {{#unless level}} </nav> {{/unless}} - AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.