Is there a way to order the items in a menu?
I’m doing {{ range .Site.Menus.myitems }}, and have tried things like
{{ range .Site.Menus.assignments.ByDate }}, but this doesn’t work.
Is there a way to order the items in a menu?
I’m doing {{ range .Site.Menus.myitems }}, and have tried things like
{{ range .Site.Menus.assignments.ByDate }}, but this doesn’t work.
You can set the Weight for each menu entry.
Thanks - but doesn’t work for this. Too many other things depend on weight, and fractional (e.g., 3.2) weights don’t seem to work. All I really want is to sort by date (which works easily for Pages, but doesn’t seem to be an obvious way to do it for menu items).
For menu items there are no concept of date. You can sort ByWeight and ByName. That’s it.
Okay, thanks for the help!