Hi, i just spend half of my day tring to add an active class to a nested element in the main menu, i dont know but probably i was doing something wrong but anyway thats my solutions:
So i have the following content:
content > fr > news.mp
content > fr > home.md
and my config.toml:
SectionPagesMenu = "main"
languageCode = "fr"
[menu]
[[menu.main]]
name = "General information"
identifier = "home"
url = "/"
weight = 0
parent = 'fr'
[[menu.main]]
name = "News"
identifier = "news"
url = "/"
weight = 0
parent = 'fr'
and the menu template:
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
{{ range .Children }}
<li class="col-md-3 ">
<a class="col-md-12 text-center {{ if $.IsPage }}{{ if eq .Identifier $.Type }}active{{ end }}{{ end }}" href="{{.URL}}">
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
{{end}}
{{end}}
and Voila!