Hi David I think you could improve the code by adding menu manipulator for sort by weight.
Here is the line you could add.

// Transform the tree using manipulators
$manipulators = [
['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],
];
$tree = $this->menuTree->transform($tree, $manipulators);

I haven't ever understood how to participate in drupal repositories. That's why I'm posting the code here.

TY!

Comments

tpzurdo created an issue. See original summary.

brdolenc’s picture

Assigned: Unassigned » brdolenc

I working on it.

mgoncalves’s picture

When I have a link menu that starts with the same letter, I can't set an order to server the rest. for example ('A-', 'A+').
That's really useful.

Thanks @tzurdo to give the code.
Waiting @brdolenc finish.

brdolenc’s picture

Status: Active » Needs review
StatusFileSize
new728 bytes

Needs review patch.

mgoncalves’s picture

#4 Works for me.

mgoncalves’s picture

mgoncalves’s picture

Status: Needs review » Reviewed & tested by the community

davidwbarratt’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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