Hi,
I use this
[taxonomies]
iveco = "iveco"
linux = "linux"
medien = "medien"
navigation = "navigation"
programm = "programme"
reise = "reisen"
software = "software"
tutorial = "tutorials"
wohnmobil = "wohnmobile"
# Definition für das Hauptmenü Identifier und url müssen GLEICH sein
SectionPagesMenu = "main"
[[menu.main]]
name = "Wohnmobil"
weight = 20
identifier = "iveco-womo"
url = "/iveco-womo/index.html"
[[menu.main]]
name = "Hunde"
weight = 30
identifier = "hund"
url = "/hund/index.html"
[[menu.main]]
name = "Blog"
weight = 40
identifier = "blog"
url = "/blog.html"
[[menu.main]]
name = "Kontakt"
weight = 50
identifier = "kontakt"
url = "/kontakt/index.html"
in config.toml.
In the header partial I create a top level menu like this:
<nav class="menu-nav">
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li>
<a class="menu-nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}-active{{end}}" href="{{.URL}}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>
and in frontmatter of articles I have something like this:
+++
title = "Ein Theme für Hugo erstellen - Tutorial Teil 1 - Das Rohgerüst und die Startseite"
date = "2017-02-25"
software = ["Webseiten"]
programme = ["Hugo"]
tutorials = ["Hugo"]
+++
Now when I render taxonomy links on the list page for an aside sub menu like this
<section>
<h2>Rubriken</h2>
<ul>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
<li>
<a href="{{ "/" | relLangURL}}{{ $taxonomyname | urlize }}.html">{{ $taxonomyname | humanize }}</a>
</li>
{{ end }}
</ul>
</section>
I end up with an entry main
in the link list.
There obviously is no taxonomy called “main” and to rule out that this might be a built-in tax. I renaimed the menu to something like “zorg” and ended up with a menu entry zorg
and a link to {baseURL}/zorg.html where a file doesn’t exist obviously.
Did I miss something or is this a unwanted(?) behaviour of hugo?