Hello. I am setting up a menu that Netlify CMS manages. As Netlify CMS lets you reorder lists, it would make sense to use the order as it is saved in the configuration file by the CMS.
Is there a no-sort option?
I am looking to use the implicit order saved in the YMAL/TOML file. However, when weight is missing, the items are arranged alphabetically. As the items are ordered within the UI’s drag and drop, it isn’t apparent to a CMS user why they would also need to add a weight manually. Hence, I am hoping there is a no-sort option.
I don’t know of any. But this something I would also like very much: using the plain order in absence of weight. You should definitely create a ticket (making sure there isn’t one already).
I can already foresee some complication when using both config and front matter etc… but it’s worth opening a conversation.
Yeah. It should be possible to handle the entries in site config (array with determinate order), but it seems like the order of page-defined entries would be subject to an indeterminate rendering sequence.
I feel that in a context of editing, it’s always been easier to handle menus from a single config file rather than spread out content files.
pageRef it’s now very convenient to target internal pages with the config file menu UX…
I feel like expecting a
.Weight for a menu entry is a legacy constraint we should question.
Also I guess a project currently using Front Matter for menu will have setup
Weight in the Front Matter, and so shouldn’t be impacted by this suggested improvement? (Namely, deduct order from the config file entry if a weight is missing)
pageRef or defining the menu entry in front matter, neither
.IsMenuCurrent will work, making the task of setting an
active class on a entry difficult.
Not sure about this one. I’ve seen some rather hideous configs.
We also have this to consider:
sectionPagesMenu = "main"
Which some users complement with entries in site config and/or front matter.