Hi all. I think many drupal developers have had a problem on how to integrate high-quality menus, including dropdown into Drupal menus system.
Nowdays, (as i googleit and search drupal.org) all we have only one third-party menu implementation into Drupal's - it's well known Superfish menu (or suckerfish) http://users.tpg.com.au/j_birch/plugins/superfish/
Here is the tutorial how to integrate superfish into your drupal 6 (site is not my)
http://ericwijaya.wordpress.com/2010/01/06/add-superfish-drop-down-menu-...
BUT, i see that there is no rich menu animate options, prestyled css with different styles, so i started search on how to integrate css, js - generated menus. Here are some examples of really cool menu systems, and YOU CAN GENERATE ANY STYLE YOU WANT with this menu generators, that's cool, in not it?
http://www.filamentgroup.com/lab/jquery_ipod_style_and_flyout_menus/
http://www.mycssmenu.com/#css-menu-demo
http://www.izzymenu.com/
(check out them - its cool)
So, i want to ask, who can help with integration of these menus?
The problem is that you need to get drupal menu into the strikt ul li structure, i foun how to make this with the following code:
$my_menu = menu_tree('primary-links');//load the formatted menu_tree from drupal
$my_menu = str_replace("leaf", "", $my_menu );//strip the leaf class
$my_menu = str_replace("active-trail", "", $my_menu );//strip the active trail class
$my_menu = str_replace("menu", "", $my_menu );//strip the menu class
$my_menu = str_replace("active", "", $my_menu );//strip the active class
$my_menu = str_replace("expanded", "", $my_menu );//strip the expanded class
$my_menu = str_replace(" first", "", $my_menu );//strip the first tags (w and w/o space)
$my_menu = str_replace("first", "", $my_menu );//strip the first tags (w and w/o space)
$my_menu = str_replace(" last", "", $my_menu );//strip the last tags (w and w/o space)
$my_menu = str_replace("last", "", $my_menu );//strip the last tags (w and w/o space)
$my_menu = str_replace(" class=\"\"", "", $my_menu );//strip the now empty class attribute and quotes
$my_menu = "
- " . substr($my_menu, 4, strlen($my_menu));//replace the
- with a ul tag thats classed for Superfish
print ($my_menu);
(insert this code into page.tpl.php instead of navigation print theme('links', $primary_links, array('class' => 'links primary-links'))) http://www.drupal.ru/node/36709
this is useful for superfish as you see in comments
So have you an idea how to implement generated menus?
Comments
_
The nice_menus module adds superfish menus to drupal.
thanks, but i there a way to
thanks, but i there a way to integrate services-generated menus?
_
sorry, i don't understand the question.
i explained here
i explained here above:
-----
BUT, i see that there is no rich menu animate options, prestyled css with different styles, so i started search on how to integrate css, js - generated menus. Here are some examples of really cool menu systems, and YOU CAN GENERATE ANY STYLE YOU WANT with this menu generators, that's cool, in not it?
http://www.filamentgroup.com/lab/jquery_ipod_style_and_flyout_menus/
http://www.mycssmenu.com/#css-menu-demo
http://www.izzymenu.com/
(check out them - its cool)
So, i want to ask, who can help with integration of these menus?
_
Any jquery or js script can be easily added to any theme. The basic steps are:
1. add the script to the theme, the easiest way to do it is right in the theme's .info file
2. add the custom js/jquery needed to use the script to a script.js file located in the theme's directory.
For more details see Javascript in Drupal.
Privet! (Sorry my Russian
Privet! (Sorry my Russian isn't good at all)
This is the solution: http://drupal.org/node/708862 :)