Closed (fixed)
Project:
Menu Minipanels
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2011 at 10:49 UTC
Updated:
8 Mar 2015 at 14:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webankit commented+1
Comment #2
webankit commentedSupport Menu Block to make this module more useful
Comment #3
palmaross commentedregister
Comment #4
damienmckennaClosed a duplicate: #1257806: Assign menu minipanels to a custom menu
Comment #5
damienmckennaClosed a duplicate: #1245632: No Content in Menu Minipanel
Comment #6
brant commentedI'm looking at this in 7.x-1.0-rc2 -- what if (in the neighborhood of line menu_minipanels.module line 464) we do something like:
Seems to have caught my custom menus, but don't know if this is overkill (or would catch all cases). Maybe there's more to this issue than I'm seeing at a quick glance?
HTH.
Comment #7
damienmckennaWhat I'm intending to do is have a settings page to let you choose which menus will be available to Menu_MiniPanels, with it defaulting to the Primary and Secondary menus to imitate the way it currently works. I'm aiming to do this next week-ish, I've got a Nodewords release to do first :)
Comment #8
brant commentedI totally defer to your judgement, but if my hack in #6 (or similar) would just "make it work," perhaps it would be better to avoid adding settings? As I mentioned, though, I've not much clue if there's a potential performance penalty or other considerations here, so just a thought.
In any case -- thanks for your work. I'll be happy to test whatever you come up with against our use case at the very least.
Comment #9
brant commentedWell, it turns out that calling
menu_get_names()in #6 tickles this bug in core:http://drupal.org/node/1020364
...oddly enough, only on pages that aren't in a menu (at least for me).
So, the settings page approach is sounding pretty good at the moment... :)
For now, I've just hard-coded my particular menu name in a call to:
menu_minipanels_prepare_links(menu_navigation_links('my-custom-menu-name'));Comment #10
bryancasler commentedsubscribe
Comment #11
Jeff Burnz commentedSubscribe.
Comment #12
Jeff Burnz commentedI got my own menus working by doing my own hook_page_alter() in my theme, so not hacking the module or anything nasty like that ;)
Update: I made a tutorial explaining how to use the code below, some of my users wanted this which is how I came to this module in the first place, just be aware that you will probably have to remove this at some stage when the module gets updated to support any menu via settings: http://adaptivethemes.com/menu-minipanels-in-adaptivetheme-instant-mega-...
Totally awesome module btw, thanks a lot!
Comment #13
eclipsegc commentedPatch for anyone who needs this till something better can land.
Comment #14
dman commentedThanks EclipseGc
That helps me out today - looks like a nice small clean patch. May need to check if it has any performance impact by preprocessing all menus now, not just the primary links?
Comment #15
fluffy commentedPatch in #13 work for me as well, thank you.
Comment #16
paskainos commentedEclipseGc's patch (#13) works! It's the obvious solution (call all menus, not just main & secondary) and should be rolled in.
*Update:* Spoke too soon - the notorious #1020364: Undefined index: localized_options in menu_navigation_links() strikes again! I opted to use @brant's solution (#9) in a custom theme by including this code in template.php:
Comment #17
ArchangelGuidz commentedConfirm that it works too on my end! Great job and thanks! :)
Comment #18
parkej60 commentedI get the following error when applying the patch.
Notice: Undefined index: localized_options in menu_navigation_links() (line 1858 of ..../includes/menu.inc).
Comment #19
damienmckennaOk, lets try this one out for size. It's a more elaborate version of the idea suggested by EclipseGc that tracks the specific menus that are to be checked for menu_minipanels using a variable; it also includes a hook_update_N() to enable all menus (except 'devel' and 'navigation' menus) along with an update to hook_install() to do the same thing. I'm going to test this some more, but I think it should work. Lastly, I've added a list of menus to the Menu_MiniPanels settings page that shows their status, i.e. whether they can have menu_minipanels added to them. Please take a look and provide feedback, I'm hoping to commit this ASAP :)
Comment #20
damienmckennaUpdated patches that actually make it ignore the Devel and Navigation menus this time.
Comment #21
damienmckennaI've committed this.
Comment #22
damienmckennaAn update that now doesn't accidentally enable the shortcut sets on D7; this doesn't affect D6.
Comment #23
damienmckennaCommitted.
Comment #24
damienmckennaTurns out I had a #facepalm-level faux-pas, these patches resolve the problem.
Comment #25
damienmckennaCommitted, and I'll have a new RC out tomorrow-or-so.
Comment #27
Loyer commentedIs there any more information on supporting all menus?
I have tried answer #12 but get a "Fatal error: Call to undefined function _menu_minipanels_render_panel()" when trying....
Comment #28
SolidSnakeGr commentedAnswer #12 points out this error for me :
Fatal error: Call to undefined function menu_minipanels_panels()
Since it is an old issue, I would like to ask if there has been a solution for it yet?
I'm also using AdaptiveThemes.
Comment #29
damienmckennaIf there's a bug using the module, please open a new issue. Thank you.