Closed eurecomphil closed 6 years ago
Add this to nav.html
<li class="hidden-xs">
<a href="#" class="dropdown-toggle visible-desktop" id="dropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ .Site.Params.dropmenu.title}}
<b class="caret"></b>
</a>
<div class="dropdown-menu dropdown-menu-left" aria-labelledby="dropdownMenuButton">
{{ range .Site.Params.dropmenu.item }}
<a class="dropdown-item" href="{{ .url | relURL }}">{{ .name }}</a>
<br> {{ end }}
</div>
</li>
{{ range .Site.Params.dropmenu.item }}
<li class="visible-xs">
<a href="{{ .url | relURL }}">{{ .name }}</a>
</li>
{{ end }}
and this to config.toml:
[params.dropmenu]
title = "This is a submenu button"
[[params.dropmenu.item]]
url = "/firstsub"
name = "First sub menu"
weight = 13
[[params.dropmenu.item]]
url = "/secondsub"
name = "Second submenu"
weight = 14
Thanks a lot @lunk-liu ! I'll give a try. Have a nice day
Thanks @lunk-liu awesome for you to step up and help fix issues. Really appreciated.
Thank you very much for your work. It is a very nice theme.
I was wondering if it was possible to use submenus ?
To be displayed when clicking on an item of "[[menu.prepend]]" Something like this example : https://i.stack.imgur.com/DW6nV.jpg
Thank you in advance !