aen
1
I have a unique use case whereby I need to display a menu with a different starting item (next page) for each page. For example these 3 pages:
In Page1, the menu should be:
Page2, Page3, Page1
Page 2:
Page3, Page1, Page2
Page3:
Page1, Page2, Page 3
I’m guessing reorder the menu array. How do I do array splice and push in Go?
ju52
2
i have this in my navigation.html
{{ if .IsPage }}
<div class=pt4>
{{if .NextInSection}}<a href={{.NextInSection.Permalink}} title="{{.NextInSection.Title}}">next</a>{{else}}no next{{end}}
this
{{if .PrevInSection}}<a href={{.PrevInSection.Permalink}} title="{{.PrevInSection.Title}}">prev </a>{{else}}no prev{{end}}
</div>
{{end}}
little simplified for understanding
1 Like