README.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. NICE MENUS MODULE
  2. -----------------
  3. Currently maintained by: Addison Berry (add1sun)
  4. Orginally created by: Jake Gordon (jakeg) http://drupal.org/user/15674/contact and http://www.jakeg.co.uk/
  5. 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.
  6. Please report any bugs, feature requests, etc. at: http://drupal.org/project/issues/nice_menus.
  7. Installation
  8. ------------
  9. 1. Copy nice_modules folder to your sites/all/modules directory.
  10. 2. At Administer -> Site building -> Modules (admin/build/modules) enable the module.
  11. 3. Configure the module settings at Administer -> Site configuration -> Nice Menus (admin/settings/nice_menus).
  12. 4. Configure the Nice Menus block(s) at Administer -> Site building -> Blocks (admin/build/block), setting the source menu and menu style, etc.
  13. 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.
  14. 6. See below sections on Customization and Advanced Theming as well as the handbook page (http://drupal.org/node/185543) for more tips.
  15. Upgrading
  16. ---------
  17. For upgrades between versions, read the UPGRADE.txt file included with the module.
  18. Issues
  19. ------
  20. You can track known issues at http://drupal.org/project/issues/nice_menus.
  21. Customization
  22. -------------
  23. 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.
  24. To help understand the CSS, the HTML looks like this, where
  25. x is a number;
  26. TYPE is down/left/right;
  27. PATH is the menu path such as node/343;
  28. MID is the menu id such as 33:
  29. <ul id='nice-menu-x' class='nice-menu nice-menu-TYPE'>
  30. <li id='menu-MID' class='menu-path-PATH'><a href='#'>This is a menu item</a></li>
  31. <li class='menuparent menu-path-PATH'><a href='#'>A submenu</a>
  32. <ul...><li...>...</li>
  33. </ul>
  34. </li>
  35. ...
  36. </ul>
  37. If you have more than one nice-menu and want to target a particular one,
  38. use its id (e.g. ul#nice-menu-2).
  39. 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:
  40. Make hovered links white with a black background:
  41. ul.nice-menu li a:hover {
  42. color: white;
  43. background: black;
  44. }
  45. Make the link to the current page that you're on black with yellow text:
  46. ul.nice-menu li a.active {
  47. color: yellow;
  48. background: black;
  49. }
  50. Get rid of all borders:
  51. ul.nice-menu,
  52. ul.nice-menu ul,
  53. ul.nice-menu li {
  54. border: 0;
  55. }
  56. Get rid of the borders and background colour for all top-level menu items:
  57. ul.nice-menu,
  58. ul.nice-menu ul,
  59. ul.nice-menu li {
  60. border: 0;
  61. background: none;
  62. }
  63. ul.nice-menu-right li.menuparent,
  64. ul.nice-menu-right li li.menuparent {
  65. background: url('arrow-right.png') right center no-repeat;
  66. }
  67. li.menuparent li, li.menuparent ul {
  68. background: #eee;
  69. }
  70. Have a nice menu stick right at the top of the page e.g. for an admin menu:
  71. #block-nice_menus-1 {
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. }
  76. In Firefox, as above but where the menu doesn't move as you scroll down the page:
  77. #block-nice_menus-1 {
  78. position: fixed;
  79. top: 0;
  80. left: 0;
  81. }
  82. That should get you started. Really this is just about knowing your CSS and styling it the way you want it.
  83. Advanced theming
  84. ----------------
  85. If you're creating or modifying your own theme, you can integrate Nice menus more deeply by making use of these functions:
  86. theme_nice_menus() -- themes any menu tree as a Nice menu.
  87. theme_nice_menus_main_menu() -- themes your main menu as a Nice menu.
  88. theme_nice_menus_secondary_menu() -- themes your secondary menu as a Nice menu.
  89. 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.