The query in menu_get_item() is at the heart of Drupal. It calculates the current menu callback for the requested path. Sometimes, you need to finesse that. This patch just adds a tag which facilitates alteration.

CommentFileSizeAuthor
#4 mgi.patch530 bytesmoshe weitzman
mgi.patch1 KBmoshe weitzman

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

naxoc’s picture

Subscribe

moshe weitzman’s picture

Oy - not even a 1 line patch is safe for bit rot.

moshe weitzman’s picture

Status: Needs work » Needs review
StatusFileSize
new530 bytes

reroll.

chx’s picture

Looks good and useful.

chx’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Can you provide an example of such finessing? It might make for a good documentation snippet too.

moshe weitzman’s picture

Well, the kinds of hacks I have in mind should not be documented :). I don't have any specifics, but the general problem I want to solve is "work around the rigidity of the menu system and do dynamic stuff like in D5". I imagine this being used by site builders and not contrib developers. Contrib has hook_menu_alter() and they should try to stay within that. This hook is for when you need site specific menu routing.

moshe weitzman’s picture

this is a 1 line patch, with zero side effects. rtbc for 3 weeks ... lets commit, please.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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