# Ordering Menu Items

**URL:** <https://discourse.gohugo.io/t/ordering-menu-items/1841>\
**Category:** support\
**Created:** [October 6, 2015, 6:46pm UTC](https://discourse.gohugo.io/t/ordering-menu-items/1841 "2015-10-06T18:46:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://discourse.gohugo.io/u/Dave)\
**Post date:** [October 6, 2015, 6:46pm UTC](https://discourse.gohugo.io/t/ordering-menu-items/1841/1 "2015-10-06T18:46:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 6, 2015, 7:08pm UTC](https://discourse.gohugo.io/t/ordering-menu-items/1841/2 "2015-10-06T19:08:02Z")

</div>

You can set the Weight for each menu entry.

---

<div class="post-metadata">

**Author:** ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://discourse.gohugo.io/u/Dave)\
**Post date:** [October 6, 2015, 7:58pm UTC](https://discourse.gohugo.io/t/ordering-menu-items/1841/3 "2015-10-06T19:58:36Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 6, 2015, 8:13pm UTC](https://discourse.gohugo.io/t/ordering-menu-items/1841/4 "2015-10-06T20:13:41Z")

</div>

For menu items there are no concept of date. You can sort ByWeight and ByName. That’s it.

---

<div class="post-metadata">

**Author:** ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://discourse.gohugo.io/u/Dave)\
**Post date:** [October 6, 2015, 11:19pm UTC](https://discourse.gohugo.io/t/ordering-menu-items/1841/5 "2015-10-06T23:19:15Z")

</div>

Okay, thanks for the help!
