Closed (fixed)
Project:
Acquia Marina
Version:
6.x-3.0-beta1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 May 2010 at 20:35 UTC
Updated:
21 Jan 2011 at 06:30 UTC
Hello
Is it possible to use Superfish for the secondary links can have a second level as for primary links?
Thank you in advance.
Comments
Comment #1
Clément commentedTest without much success :
I got this code (in template.php of fusion):
And I added by :
I got this code (in page.tpl.php of acquia_marina):
<?php print theme('grid_block', $primary_links_tree, 'primary-menu'); ?>And I added by :
<?php print theme('grid_block', $secondary_links_tree, 'primary-menu'); ?>The secondary menu works well with Superfish but I change #primary-menu by #secondary-menu.
If I put this code, the menu does not work anymore:
<?php print theme('grid_block', $secondary_links_tree, 'secondary-menu'); ?>Which page do I need to change to get there? Thank you very much for your help!
Comment #2
jeremycaldwell commentedI got this working today with the Acquia Marina theme and you were very close with the process. This was the first time I've attempted this so thankfully I got it working. Here are the changes I made:
Template.php:
Then in the page.tpl.php, change the secondary menu code to this:
Be sure to clear your site cache so it reloads the updated theme files and you should be all set. There isn't any CSS styling in place for these dropdown menus and the "overflow: hidden;" on the .row and .block will cut off the dropdown menu and stop it from showing correctly. So you can do a bit of jQuery to fix that like below or add this to your local.css.
And if you go the jQuery method add this to your script file for the theme.
Hope that helps!
Comment #3
Clément commentedHello
Thank you very much for your reply, I did not uh time before to test your solution.
So I added the template.php page with the code that you gave me, I changed the page.tpl.php page and added to the Acquia-marina-script.js page script that you gave me given. I also cleared all my cache.
Here is the code I found :
Now if I put my cursor on the menu the menu is closed. Would you have a solution to this problem? Thank you.
Comment #4
jeremycaldwell commentedDid you set your Secondary menu items to "expanded" for those that had child menu items on them? If not give that a try first. Just need to make sure they are set to expanded so they display all the time in your dropdown. And of course clear your site cache on your Performance page when you make these changes to your theme files so it reloads them.
Comment #5
Clément commentedYes, of course, I am satisfied for having enabled the menu expanded. I also emptied the cache.
The sub-menu appears when I analyze the html code (see the code given above) but if I pass the mouse over the menu, it does not open (as if the java code does not work). Is there a file to edit in the theme fusion_core? Thank you for your help!
Comment #6
jeremycaldwell commentedWell the code above shows one level of menu items not two. So seems you still need to get the Secondary menu to print two level menu items rather than just the top level. You have one (ul) and that is one unordered list (top level menu) and there aren't any other (ul) within the (li) so that means it's just printing one level of the menus and not any sub menus. Once you get the menu to print correctly it should show the sub menu items on hover but keep checking your source code to make sure it prints the menu correctly with all it's levels.
Comment #7
Clément commentedIncorrect, if the code above shows just the second level. Here is the entire code of the menu as it appears :
The second level is very present but it does not open, it remains hidden when the cursor passes over.
Comment #8
jeremycaldwell commentedExcellent, thanks for posting the entire snippet of code for the secondary menu. Now try adding this bit of CSS to your local.css file to see if you get a dropdown menu from the Secondary menu.
That might work, and if it does there is a better way to do that but this is for testing to see if it does the trick as it might affect other aspects of your site.
Comment #9
Clément commentedI added the CSS in local.css now it works, I'm really happy!
If I understood your message #2 (because I do not understand English very well) you give me the solution with CSS OR jQuery. I tested CSS without success (maybe I forgot to empty the cache) and how jQuery does not work.
Thank you very much for helping me and also for your patience ;)
Greetings.
Clément
Comment #10
jeremycaldwell commentedGlad we got this working :)
I think my CSS was incorrect in the first example a few responses up as it should have been "overflow: visible;" instead which is what is working for you. Now the preferred method would be to undo the CSS I just had you test with and add the jQuery to the script that comes with the theme so you set it's parent div to have the "overflow: visible;" and removes the hidden that you are seeing by default.
So both methods work, just the jQuery one is more specific and a better approach in this situation. You can also target the secondary menu wrapping div for the .block and .row and set them to "overflow: visible;" too as another method.
Marking this as fixed as we got this working and have a few different solutions for it now.
Comment #11
Clément commentedThank you for this clarification.
I just passed to operate the menu with your first method (jQuery):
Code:
Replaced by:
That, I think this issue will surely be useful to other people. Maybe one day there will be this option automatically in theme acquia_marina ...
Comment #13
plousia commentedHow would this work if I'm printing the secondary (or primary for that matter) menu as a block, rather than using the theme default? Thanks!
Comment #14
jeremycaldwell commented@plousia, if you are printing it as a block there isn't much you can do to get it to display with dropdowns. The theme doesn't support dropdown menus like this through blocks so you are out of luck in this instance of than using the Skinr style "Vertical menu (for sidebar blocks)".