Active
Project:
Menu Inject Block
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Feb 2012 at 03:55 UTC
Updated:
11 Jul 2012 at 04:36 UTC
Jump to comment: Most recent file
Comments
Comment #1
andrew m riley commentedI'm guessing its a bug (the 7.x branch is still very much in development). The block should be living in the menu, not a link to the block.
Comment #2
IWasBornToWin commentedThat would be very cool
Comment #3
IWasBornToWin commentedThis is an inline menu. Wonder if that would matter?
Comment #4
eme commentedWorks fine for me in D7, BUT it seems that it is may not be taken into account if it is the main menu called by the theme (tested with OMEGA).
OMEGA runs theme_links and not theme_menu_links to output its menu (and it has overrides on the links (omega_links)). It may be the same in other themes.
Comment #5
eme commentedI have worked on this and I may have a suggestion :
We could use the theme_link function instead of the theme_menu_link function.
The principle of changing the link in menu_link_alter seems strange to me, but if we do not see something cleaner, I suggest :
as we need the module type and delta but no real paths that are for example everywhere via contextual link module. I wrote the theme_link function like this (taking what the module already does) :
Why ?
1. We may see actually the output in the administration menu (I think an global option or per menu or per item would be great as we do not really kwow what we will put into the blocks and it may be too much). See image attached. Some css is required, though to avoid collapsing the drag and drop with contextual link.
2. Any l('thing', 'menu_inject_block/module_id/delta') would take the block so the module may be more extensible and will cleanly work with any menu from theme (tested with omega, but it is sure that any link goes through the l() function).
3. Really interesting (and that is why I digged into the module), we may use it in conjunction with megamenu module (http://drupal.org/project/megamenu) so we can imagine a megamenu containing thanks to your module a view, a search block, a custom block, in one word, anything. And I think that any type of mega menu could leverage this module the same way.
@Adrew M Riley : Please tell me if you think we can go to this direction or not and I may then contribute a clean version of above suggestions.
Comment #6
andrew m riley commentedI really like the concept eme. I want to give it a try to see how it would work out. If it does work out, I think this would be great for a 2.x branch.
Comment #7
eme commentedGreat. Tell me if / how you want me to help out.
Comment #8
eme commentedHere is a patch, but generated with Netbeans so tell me if it does not apply well.
What is the meaning of /% in the hook_menu. What is it required for ?
Comment #9
phantomvish commentedIs there a D6 version of this patch that I can test? BTW, I'm trying to do the same thing in D6 and all I get is a menu item with path pointing to "block-system-0". Wonder what I might have missed :-(
Comment #10
phantomvish commentedI'm able to see the block in menu when I use garland theme, but I want it in mystique theme.
Comment #11
eme commentedAs the development of this module seems stopped for now, you can switch to maximenu module.
Comment #12
gratefulsk commentedIf anyone is coming across this thread I just wanted to point out that there is a module with a stable release that does pretty much the exact functionality. It is Menu Attach Block.
Comment #13
phantomvish commented@celticremark - thanks, but no d6 version of Menu attach block :-(