[development] Hook_menu_alter doesn't work if menu item changed

Earl Miles merlin at logrus.com
Mon Apr 27 20:16:38 UTC 2009


Nancy Wichmann wrote:
> BTW, during my testing, I dragged the top menu item to after the next 
> one. This marked BOTH items as customized, even though I only changed 
> one. Is that also the intended behavior?

Yes, tabledrag re-orders everything between an item's new position and 
old position. Here's an example of why:

Original weights:

Item A: 1
Item B: 2
Item C: 3
Item D: 4
Item E: 5

Move item D to the 2nd position. New weights:

Item A: 1
Item D: 2 [changed]
Item B: 3 [changed]
Item C: 4 [changed]
Item E: 5


More information about the development mailing list