[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/nice_menus/ -> README.txt (source)

   1  // $Id: README.txt,v 1.12 2007/10/29 16:38:28 add1sun Exp $
   2  
   3  NICE MENUS MODULE - CSS DROPDOWNS
   4  ---------------------------------
   5  
   6  Currently maintained by: Addison Berry (add1sun) http://drupal.org/user/65088/contact
   7  
   8  Orginally created by: Jake Gordon (jakeg) http://drupal.org/user/15674/contact and http://www.jakeg.co.uk/
   9  
  10  This module should make it easy to add dropdown menus, using CSS-only in capable browsers (Firefox, Opera, Safari, etc) and with additional Javascript for lesser browsers (IE).
  11  
  12  Nice menus should work with all of the latest browsers but please report any bugs, feature requests, etc at: http://drupal.org/project/issues/nice_menus.
  13  
  14  
  15  Installation
  16  ------------
  17  1. Copy nice_modules folder to your sites/all/modules directory.
  18  2. At Administer --> Site building -> Modules (admin/build/modules) enable the module.
  19  3. Configure the module settings at Administer -> Site configuration -> Nice Menus (admin/settings/nice_menus).
  20  4. Configure the Nice Menus block(s) at Administer -> Site building -> Blocks (admin/build/block), setting the source menu and menu style, etc.
  21  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.
  22  6. See below sections on Customization and Advanced Theming as well as the handbook page (http://drupal.org/node/185543) for more tips.
  23  
  24  Upgrade
  25  -------
  26  Please read the UPGRADE.txt file for upgrade information.
  27  
  28  Features
  29  --------
  30  * Up to 10 menus - through settings you can configure the number of 'nice menus'
  31  * Horizontal menus or vertical menus popping right or left
  32  * Simple default styling which can be overridden using your own stylesheet
  33  
  34  Issues
  35  ------
  36  
  37  * Because this module tries to be as Javascript light as possible, various wishlist features cannot be added that are nor supported by CSS only.
  38  * The menus may not work perfectly with all themes. Try Nice Menus out with the default Garland or Bluemarine first to check it works there (it should) before filing a bug report or trying to write a patch for other themes.
  39  * Track bugs at http://drupal.org/project/issues/nice_menus?categories=bug
  40  * Try adding .block-nice_menus {position: relative;} or .block-nice_menus {position: absolute;} to a stylesheet which may fix some issues.
  41  * General issues with gaps between menu items in some custom themes.
  42  
  43  Customization
  44  -------------
  45  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.
  46  
  47  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:
  48  
  49  Make hovered links white with a black background:
  50  
  51    ul.nice-menu li a:hover { 
  52      color: white; 
  53      background: black;
  54    }
  55  
  56  Make the link to the current page that you're on black with yellow text:
  57  
  58    ul.nice-menu li a.active { 
  59      color: yellow; 
  60      background: black;
  61    }
  62  
  63  Get rid of all borders:
  64  
  65    ul.nice-menu,
  66    ul.nice-menu ul,
  67    ul.nice-menu li {
  68      border: 0;
  69    }
  70  
  71  Get rid of the borders and background colour for all top-level menu items:
  72  
  73    ul.nice-menu,
  74    ul.nice-menu ul,
  75    ul.nice-menu li {
  76      border: 0;
  77      background: none;
  78    }
  79  
  80    ul.nice-menu-right li.menuparent,
  81    ul.nice-menu-right li li.menuparent { 
  82      background: url('arrow-right.png') right center no-repeat; 
  83    }
  84  
  85    li.menuparent li, li.menuparent ul {
  86      background: #eee;
  87    }
  88  
  89  Have a nice menu stick right at the top of the page e.g. for an admin menu:
  90  
  91    #block-nice_menus-1 {
  92      position: absolute;
  93      top: 0;
  94      left: 0;
  95    }
  96  
  97  In Firefox, as above but where the menu doesn't move as you scroll down the page:
  98  
  99    #block-nice_menus-1 {
 100      position: fixed;
 101      top: 0;
 102      left: 0;
 103    }
 104  
 105  That should get you started.  Really this is just about knowing your CSS and styling it the way you want it.
 106  
 107  Advanced theming
 108  ----------------
 109  If you're creating or modifying your own theme, you can integrate nice menus more deeply by making use of these functions:
 110  theme_nice_menu() -- themes any menu tree as a nice menu.
 111  theme_nice_menu_primary_links() -- themes your primary links as a nice menu.
 112  
 113  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.


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7