Problem/Motivation

CMS editors often want to re-order menu items and the most common way of doing this is via the menu UI. Currently re-ordering menu items via the interface does not update the weight for smart menu links.

Steps to reproduce

  1. Install smart menu links (Or event platform)
  2. Add smart menu link with default weight of 0 to the main menu
  3. Go to main menu UI
  4. Add a couple of menu items
  5. Re-order menu content so smart menu link is in the middle
  6. Save new order
  7. Note that the smart menu link item has a weight of 0 again

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

liampower created an issue. See original summary.

nickolaj made their first commit to this issue’s fork.

nickolaj’s picture

Status: Active » Needs review

Added `$overrideAllowed` property to the `SmartMenuLink` plugin class, allowing weight, parent, menu_name, expanded, and enabled values to be persisted when reordering menu items through the admin UI.

liampower’s picture

Thanks nickolaj! Patch from #3 fixed the issue allowing smart menu link weight to be controlled by the menu UI.

Will leave in needs review for now to allow others to confirm.

  • mandclu committed b8d2014f on 1.0.x authored by nickolaj
    fix: #3571314 Menu weight ignored by smart_menu_links
    
    By: liampower
    By...
mandclu’s picture

Status: Needs review » Fixed

Thanks for everyone's work here. Merged in, and I will roll a new release shortly.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.