Posted by filpet on September 2, 2009 at 7:16pm
Jump to:
| Project: | Imagemenu |
| Version: | 6.x-1.0-rc5 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hey!
I have installed imagemenu but i can't create Primary menu items with it, i only can create new menus. How can i make a primary link images with this module??
-Peter
Comments
#1
Same problem here.
Any advice?
Thanks.
Shay.
#2
Why do you need Imagemenu to be able to generate the primary menu? If you tell us, perhaps there are alternative ways of providing the functionality you need.
#3
I'm having a REALLY tough time customizing Drupal and I'm having this same issue, which is just a small portion of the difficulties I'm having with this software.
I run a website in which I have a top navigation bar that uses rollover images and one level of links below it on a couple of the primary items. This is setup in an unordered list fashion, stylized with CSS and uses a custom javascript for the rollover images on the primary items. I'm attempting to replicate the exact same menu for Drupal.
From the sounds of this module, it will do the same thing, but I can't figure out how to install it, update it, get a freakin' menu to work....etc.
Here's what I did:
1. Downloaded imagemenu module.
2. Extracted to desktop.
3. Copied folder to my local Drupal install in the "modules" directory (so the path for this module is "modules>imagemenu").
4. Went to admin>site build>modules and enabled the Imagemenu module.
5. Saved configuration.
6. Navigated to admin>site build>menus and there's no option for Imagemenu in there (like other posts I've seen that have suggested this is where it should be).
7. Went to admin>site build (switched to "by module" option) then found Imagemenu in there, but not under the Menus area.
Now, when I click on the Imagemenus area I can get into where I can create a new menu, add items, give Image paths, etc. And when I add that to a block, it will show up, but I don't want it to show up in a block. I have a custom area that I want it to display in on the page.tpl.php page, so I'm lost when it comes to the correct PHP function to access the menu and display it the correct way.
As well, it seems as if I can't create secondary items using Imagemenu because it requires an image path for every item I create and that's not what I want either. I only want the image rollovers for the primary links...secondary links are all styled with CSS. Also, it seems that Imagemenu and the regular Menus area do not communicate menus back and forth, so I can't assign secondary links to the Imagemenu from there either...
Can anybody help me to understand this better? Maybe I don't even need Imagemenu at all, but either do a custom solution or use a different module of some sort, but I would GREATLY appreciate any help that can be given in this matter.
Thank you
Mike
#4
Hi Mike,
I think the module you want is http://drupal.org/project/nice_menus NiceMenus - this does nifty drop-downs but I'm not sure how you'd configure it to display an image instead of text I'm afraid. Yes you're right about the menu systems not speaking to each other, maybe they'll sort this in a later edition of imagemenu (although I think it's somewhat neglected at the moment). Perhaps you can hack NiceMenus to display an image for the Primary items. Good luck.
Also I think you need to put additional modules into sites>all>modules.
#5
Hiya, it's neglected because the guy who volunteered to maintain the 6.x branch gave up very soon after releasing the code. Shame as the code was fairly solid... I've got a new guy onboard as I have absolutely no interest in maintaining anything after my own 5.x version so hopefully there should be some action sometime soon...
Pobster
#6
I'm the new guy :)
#7
Can anyone please explain a simple way to include icons in Primary links? As someone else commented before, Imagemenu creates new menus, and a block, but it doesn't have a functionality to add the menus created to Primary links.
Is there a solution for this?
#8
Imagemenus aren't menus, they're blocks with custom made menus in them. So no... However, there are non-Imagemenu ways of achieving the effect you're after but I'm not going to Google them for you, I'm sure you can do that yourself!
Pobster
#9
Many thanks for the explanation pobster. I have spent quite some time googling/reading about alternatives to place icons in primary links. Every single one of them involves hacking into template.php or page.tpl.php, which frankly, doesn't seem like a solution of a professional CMS to me. It's just such a shame that simple things are ever so complicated with drupal! Thanks anyway.
#10
Alekb, if you want icons alongside texts, you could use CSS to achieve this. F. ex.
#block-menu-primary-links .menu li
{
background: url(/sites/all/themes/mytheme/images/primary-menu-icon.png) no-repeat;
padding-left: 20px; /* create room for the icon */
}
In order to have a different icon for every item you'd need PHP skills, as you would have to create a menu item theme function.
#11
The latest version of imagemenu puts a class in the li tag for each item so no theme function needed.
Create a css rule for each item, replacing N with the number of the menu item as generated by imagemenu (Firebug is your friend).
#block-menu-primary-links .menu li.imagemenu-item-N{
background: url(/sites/all/themes/mytheme/images/primary-menu-icon-N.png) no-repeat;
padding-left: 20px; /* create room for the icon */
}