Skip to content

Weight on menu items is ignored #508

@asubiotto

Description

@asubiotto

I believe that #480 caused a regression when sorting menu items. Here is a menu definition that used to work (Home is sorted before About):

[menu]
    [[menu.main]]
        name = "Home"
        weight = 1
        identifier = "home"
        pageRef = "/"
    [[menu.main]]
        name = "About"
        weight = 2
        identifier = "about"
        pageRef = "about/"
    [[menu.main]]
        name = "Portfolio"
        weight = 3
        identifier = "portfolio"
        pageRef = "portfolio/"

However, this menu now sorts About before Home. Modifying the identifier for Home from home to _home achieves the correct order, which makes me believe #480 is what broke this. Forgive me if I do not completely understand, but I think the @joshuamkite's use case should be handled by assigning weights to menu items rather than sorting by identifier, so I propose reverting that change. In any case, it seems like assigning weights to menu items is currently broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions