Hi wonderful peoples. There was probably a better title for this, but I am not sure what it is. Hopefully my ignorance here will help others.
So I am getting the “.URL is deprecated…use .Permalink” message. So I try to fix it by replacing .URL with .Permalink or .RelPermalink, but then I get “can’t evaluate field Permalink” error.
My hunch is that this is a scoping issue? Can anyone suggest a change to my code below that would resolve this issue?
Thanks in advance,
Jeff
{{ define "menu-node" }}
{{ if .HasChildren }}
<li class="nav-item">
<a class="nav-link has-sub-menu" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
<ul class="sub-menu">
{{ range .Children.ByWeight }}
{{ template "menu-node" . }}
{{ end }}
</ul>
</li>
{{else}}
<li class="nav-item">
<a class="nav-link" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end }}
{{ end }}
<nav class="nav docs-nav">
<ul class="nav-list">
{{ range .Site.Menus.docs }}
{{ template "menu-node" . }}
{{end}}
</ul>
</nav>