You are here

README.txt in Nice Menus 6.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 5 README.txt
  3. 6 README.txt
  4. 7.3 README.txt
  5. 7.2 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_primary_links() -- themes your primary links as a Nice menu.
theme_nice_menus_secondary_links() -- themes your secondary links 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.

File

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