Field relPermalink not working for a type page.Page?

I have issues with contexts. Probably.
This always works:

<link rel="next" href="{{with .PrevInSection}}{{.relURL}}

But this

{{if not (default false .Params.NoHierarchy)}}
<link rel="next"
href="{{with .PrevInSection}}{{.relURL}}
{{ else }}
{{ with .Params.Next }}
{{(site.GetPage .).RelPermalink}}
{{ end }}{{ end }}">

<link rel="prev"
href="{{ with .NextInSection }}{{ .relPermalink }}{{ else }}{{ with .Params.Prev }}
{{(site.GetPage .).RelPermalink}}
{{ end }}
{{ end }}">

Even though it’s based on the same code.
Hugo indicate

ad" .>: error calling partial:
execute of template failed:
template: partials/docs/inject/head.html:12:48:
executing "partials/docs/inject/head.html" at <.relPermalink>:
can't evaluate field relPermalink in type page.Page

But I don’t understand this. The logic should be simple: if there is no .Params.Prev/Next, use sorting by weight.

Try .RelPermalink.

1 Like

:face_with_symbols_over_mouth: :face_with_symbols_over_mouth: :face_with_symbols_over_mouth: :nauseated_face: :face_vomiting:
Case-sensitive languages are the absolute worst. I couldn’t see it.
Thank you :sweat_smile:, Now it’s all perfect, I’m on my way toward total 100% on !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.