As per title, I’m using some conditions to check if the next page has been set in a language or in another one. To check that, I have:
if eq .NextPage.Params.lang "en"
The problem is that I got the error of “nil pointer evaluating page.Page.Params”.
Any help?
bep
2
NextPage will be nil when you arrive at the end. You need to first check if it’s not:
if .NextPage
if eq .NextPage.Params.lang "en"
Worked thanks. I’ll probably donate some buckets to gohugo! It’s really too amazing.
1 Like
system
Closed
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.