<ul class="navmenu">
  {{ $currentPage := . }}
  {{ range .Site.Menus.main }}
  <li class="{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{ end }}">
    <a href="{{ .URL }}">
      {{ .Pre }}
      <span>{{ .Name }}</span>
    </a>
  </li>
  {{ end }}
</ul>
