You are here

README.txt in Nice Menus 7.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 5 README.txt
  3. 6.2 README.txt
  4. 6 README.txt
  5. 7.3 README.txt
NICE MENUS MODULE
-----------------

Currently maintained by: Addison Berry (add1sun)

Originally created by: Jake Gordon (jakeg)
http://drupal.org/user/15674/contact and http://www.jakeg.co.uk/

This module makes it easy to add dropdown and flyout menus,
using the Superfish jQuery plugin
(http://users.tpg.com.au/j_birch/plugins/superfish),
and falling back to CSS-only functionality when JS is disabled.

Please report any bugs, feature requests, etc. at:
http://drupal.org/project/issues/nice_menus.


Installation
------------
1. Copy nice_modules folder to your sites/all/modules directory.
2. At Administer -> Site building -> Modules (admin/build/modules)
enable the module.

3. Configure the module settings at
Administer -> Site configuration -> Nice Menus (admin/settings/nice_menus).

4. Configure the Nice Menus block(s) at
Administer -> Site building -> Blocks (admin/build/block),
setting the source menu and menu style, etc.

5. Return to the blocks page and enable the Nice menus block(s),
e.g. 'Nice Menu 1 (Nice Menu)' by putting it in a region.

6. See below sections on Customization and Advanced Theming as
well as the handbook page (http://drupal.org/node/185543) for more tips.

Upgrading
---------
For upgrades between versions, read the UPGRADE.txt file included with
the module.

Issues
------
You can track known issues at http://drupal.org/project/issues/nice_menus.

Customization
-------------
The module includes a default CSS layout file (nice_menus_default.css)
which is loaded for all pages.  If you don't like the default layout,
it is suggested that you create a separate customized CSS file,
and replace the default CSS file at
Administer -> Themes -> Configure -> Global settings -> "Path to
custom nice menus CSS file".
This ensures smooth future upgrades as no editing of the module files is
necessary.
NOTE: you should not edit the regular nice_menus.
css file since this contains the "logic" that makes Nice menus work.

To help understand the CSS, the HTML looks like this, where
  x is a number;
  TYPE is down/left/right;
  PATH is the menu path such as node/343;
  MID is the menu id such as 33:
<ul id='nice-menu-x' class='nice-menu nice-menu-TYPE'>
  <li id='menu-MID' class='menu-path-PATH'>
    <a href='#'>This is a menu item</a>
  </li>
  <li class='menuparent menu-path-PATH'><a href='#'>A submenu</a>
    <ul...><li...>...</li>
    </ul>
  </li>
  ...
</ul>

If you have more than one nice-menu and want to target a particular one,
use its id (e.g. ul#nice-menu-2).

A good starting point for your custom file is to make a copy of the
default file, then edit it to taste. Here are some common
customization examples for your own stylesheet:

Make hovered links white with a black background:

  ul.nice-menu li a:hover { 
    color: white; 
    background: black;
  }

Make the link to the current page that you're on black with yellow text:

  ul.nice-menu li a.active { 
    color: yellow; 
    background: black;
  }

Get rid of all borders:

  ul.nice-menu,
  ul.nice-menu ul,
  ul.nice-menu li {
    border: 0;
  }

Get rid of the borders and background colour for all top-level menu items:

  ul.nice-menu,
  ul.nice-menu ul,
  ul.nice-menu li {
    border: 0;
    background: none;
  }

  ul.nice-menu-right li.menuparent,
  ul.nice-menu-right li li.menuparent { 
    background: url('arrow-right.png') right center no-repeat; 
  }

  li.menuparent li, li.menuparent ul {
    background: #eee;
  }

Have a nice menu stick right at the top of the page e.g. for an admin menu:

  #block-nice_menus-1 {
    position: absolute;
    top: 0;
    left: 0;
  }

In Firefox, as above but where the menu doesn't move as you scroll
down the page:
  #block-nice_menus-1 {
    position: fixed;
    top: 0;
    left: 0;
  }

That should get you started.  Really this is just about knowing your
CSS and styling it the way you want it.

Advanced theming
----------------
If you're creating or modifying your own theme, 
you can integrate Nice menus more deeply by making use of these functions:
theme_nice_menus() -- themes any menu tree as a Nice menu.
theme_nice_menus_main_menu() -- themes your main menu as a Nice menu.
theme_nice_menus_secondary_menu() -- themes your secondary menu as a Nice menu.

If you really know what you're doing, you can probably even customize the menu
tree in creative ways, as those functions allow you to pass in a custom
menu tree.

nice_menus-7.x-2.4 support Upgrade included hoverIntent, jquery.bgiframe and 
superfish plugin, requirement for jQuery 1.7+. download plugins to:
site/all/libraries/jquery.hoverIntent/jquery.hoverIntent.js
site/all/libraries/jquery.bgiframe/jquery.bgiframe.js
site/all/libraries/superfish/superfish.js

Download:
http://cherne.net/brian/resources/jquery.hoverIntent.html
https://github.com/brandonaaron/bgiframe
http://users.tpg.com.au/j_birch/plugins/superfish/

File

README.txt
View source
  1. NICE MENUS MODULE
  2. -----------------
  3. Currently maintained by: Addison Berry (add1sun)
  4. Originally created by: Jake Gordon (jakeg)
  5. http://drupal.org/user/15674/contact and http://www.jakeg.co.uk/
  6. This module makes it easy to add dropdown and flyout menus,
  7. using the Superfish jQuery plugin
  8. (http://users.tpg.com.au/j_birch/plugins/superfish),
  9. and falling back to CSS-only functionality when JS is disabled.
  10. Please report any bugs, feature requests, etc. at:
  11. http://drupal.org/project/issues/nice_menus.
  12. Installation
  13. ------------
  14. 1. Copy nice_modules folder to your sites/all/modules directory.
  15. 2. At Administer -> Site building -> Modules (admin/build/modules)
  16. enable the module.
  17. 3. Configure the module settings at
  18. Administer -> Site configuration -> Nice Menus (admin/settings/nice_menus).
  19. 4. Configure the Nice Menus block(s) at
  20. Administer -> Site building -> Blocks (admin/build/block),
  21. setting the source menu and menu style, etc.
  22. 5. Return to the blocks page and enable the Nice menus block(s),
  23. e.g. 'Nice Menu 1 (Nice Menu)' by putting it in a region.
  24. 6. See below sections on Customization and Advanced Theming as
  25. well as the handbook page (http://drupal.org/node/185543) for more tips.
  26. Upgrading
  27. ---------
  28. For upgrades between versions, read the UPGRADE.txt file included with
  29. the module.
  30. Issues
  31. ------
  32. You can track known issues at http://drupal.org/project/issues/nice_menus.
  33. Customization
  34. -------------
  35. The module includes a default CSS layout file (nice_menus_default.css)
  36. which is loaded for all pages. If you don't like the default layout,
  37. it is suggested that you create a separate customized CSS file,
  38. and replace the default CSS file at
  39. Administer -> Themes -> Configure -> Global settings -> "Path to
  40. custom nice menus CSS file".
  41. This ensures smooth future upgrades as no editing of the module files is
  42. necessary.
  43. NOTE: you should not edit the regular nice_menus.
  44. css file since this contains the "logic" that makes Nice menus work.
  45. To help understand the CSS, the HTML looks like this, where
  46. x is a number;
  47. TYPE is down/left/right;
  48. PATH is the menu path such as node/343;
  49. MID is the menu id such as 33:
  50. ...
  51. If you have more than one nice-menu and want to target a particular one,
  52. use its id (e.g. ul#nice-menu-2).
  53. A good starting point for your custom file is to make a copy of the
  54. default file, then edit it to taste. Here are some common
  55. customization examples for your own stylesheet:
  56. Make hovered links white with a black background:
  57. ul.nice-menu li a:hover {
  58. color: white;
  59. background: black;
  60. }
  61. Make the link to the current page that you're on black with yellow text:
  62. ul.nice-menu li a.active {
  63. color: yellow;
  64. background: black;
  65. }
  66. Get rid of all borders:
  67. ul.nice-menu,
  68. ul.nice-menu ul,
  69. ul.nice-menu li {
  70. border: 0;
  71. }
  72. Get rid of the borders and background colour for all top-level menu items:
  73. ul.nice-menu,
  74. ul.nice-menu ul,
  75. ul.nice-menu li {
  76. border: 0;
  77. background: none;
  78. }
  79. ul.nice-menu-right li.menuparent,
  80. ul.nice-menu-right li li.menuparent {
  81. background: url('arrow-right.png') right center no-repeat;
  82. }
  83. li.menuparent li, li.menuparent ul {
  84. background: #eee;
  85. }
  86. Have a nice menu stick right at the top of the page e.g. for an admin menu:
  87. #block-nice_menus-1 {
  88. position: absolute;
  89. top: 0;
  90. left: 0;
  91. }
  92. In Firefox, as above but where the menu doesn't move as you scroll
  93. down the page:
  94. #block-nice_menus-1 {
  95. position: fixed;
  96. top: 0;
  97. left: 0;
  98. }
  99. That should get you started. Really this is just about knowing your
  100. CSS and styling it the way you want it.
  101. Advanced theming
  102. ----------------
  103. If you're creating or modifying your own theme,
  104. you can integrate Nice menus more deeply by making use of these functions:
  105. theme_nice_menus() -- themes any menu tree as a Nice menu.
  106. theme_nice_menus_main_menu() -- themes your main menu as a Nice menu.
  107. theme_nice_menus_secondary_menu() -- themes your secondary menu as a Nice menu.
  108. If you really know what you're doing, you can probably even customize the menu
  109. tree in creative ways, as those functions allow you to pass in a custom
  110. menu tree.
  111. nice_menus-7.x-2.4 support Upgrade included hoverIntent, jquery.bgiframe and
  112. superfish plugin, requirement for jQuery 1.7+. download plugins to:
  113. site/all/libraries/jquery.hoverIntent/jquery.hoverIntent.js
  114. site/all/libraries/jquery.bgiframe/jquery.bgiframe.js
  115. site/all/libraries/superfish/superfish.js
  116. Download:
  117. http://cherne.net/brian/resources/jquery.hoverIntent.html
  118. https://github.com/brandonaaron/bgiframe
  119. http://users.tpg.com.au/j_birch/plugins/superfish/