See http://drupal.org/node/15153 and http://drupal.org/node/14120 for discussion on this proposed change.

Patch is included here for further discussion (with the changes suggested by Dries). A patch is forthcoming for topics discussed in http://drupal.org/node/14120 which would make use of this patch.

Status to be changed to patch later if there are no objections following discussion.

andre

CommentFileSizeAuthor
#7 menu_inc_3.patch2.65 KBandremolnar
menu_inc_2.patch2.65 KBandremolnar

Comments

andremolnar’s picture

Patch making use of this is now added to http://drupal.org/node/14120.

andre

andremolnar’s picture

Just realising that the rules for setting status to patch would allow this to be patch since its technically ready to go. (and it might actually get noticed if its on the dev list and patch queue).

andre

dries’s picture

I'm OK with this patch but won't commit it yet until the book module patch is ready.

andremolnar’s picture

I've uploaded the latest version of the patch to book.
http://drupal.org/node/14120
andre

jonbob’s picture

I'd prefer a solution that allowed modules to declare such menu items using the menu hook, but haven't been able to come up with such a solution. I'm okay with this approach until such time as someone has a brilliant idea to make the menu hook more powerful.

andremolnar’s picture

JonBob,

I'd be happy to work on a solution with you. Right now what I had to do in the proposed changes to book was build functions to insert data into the {menu} table by hand since there was no other handler available (e.g. hook_menu). And proposing this MENU_MODULE_MENU type was the only way I could think of to clearly distinguish where these new menu items were coming from (i.e. a module doing an insert into the menu system outside of the normal chanels).

Would the creation of a new hook_ be in order. Perhaps hook_menu_block? While it would be a confusing hook name - it is does describe the desired outcome. i.e. Output from hook_menu_block would be inserted into the menu system and a block would be created for that menu.

But even then I think these new menu types (or something similar) would have to be employed in some way.

andre

andremolnar’s picture

StatusFileSize
new2.65 KB

Noticed patch was out of date - keeping it current.

killes@www.drop.org’s picture

Still applies.

Bèr Kessels’s picture

Status: Needs review » Active

the patch no longher applies

patch -p0 < menu_patch.diff
patching file includes/menu.inc
patching file includes/theme.inc
Hunk #1 succeeded at 216 with fuzz 2 (offset 1 line).
patching file misc/drupal.css
Hunk #1 succeeded at 610 with fuzz 2 (offset 57 lines).
patching file modules/system.module
Hunk #1 FAILED at 653.
1 out of 1 hunk FAILED -- saving rejects to file modules/system.module.rej

magico’s picture

Version: x.y.z » 6.x-dev
Status: Active » Needs work

@andremolnar: reroll a patch.

andremolnar’s picture

menu system is totally being reworked by chx - if it stablizes and anything left there would allow this sort of functionality I will re-roll a patch

chx’s picture

Status: Needs work » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)