You are here

README.txt in Megamenu 6.2

Same filename and directory in other branches
  1. 7 README.txt
******************************************************************
	Contents
******************************************************************
1. Assumptions
2. Mega Menus in a Nutshell
3. How to Use This Module
4. Styling
5. Advanced Usage

******************************************************************
	Assumptions
******************************************************************
1. You are a Drupal themer (or understand theming)
2. Your markup and CSS are clean
3. You want more CSS control over Drupal menus

******************************************************************
	Mega Menus in a Nutshell
******************************************************************
Read: http://www.useit.com/alertbox/mega-dropdown-menus.html

******************************************************************
	How to Use This Module 
******************************************************************
The basis of a mega menu is a Drupal menu that is three levels deep. The first level (or tier) are the 
parent items. The second tier are categories. Tier three menu items are the sub links grouped beneath 
the second tier categories.

Consider the following example menu:

+ Library                           > Tier 1
|   |
|    + Newsletters                  > Tier 2
|   |     |
|   |      + Newsletter 1           > Tier 3
|   |      + Newsletter 2
|   |      + Newsletter 3
|   |
|    + Publications
|         |
|          + Publication 1
|          + Publication 2
|          + Publication 3
|   
+ Info Center

To create a mega menu out of a menu structured in this way:
1. Enable this module just like any other Drupal module
2. Go to the mega menu configuration page: admin/build/megamenu
3. Check the enable box next to the menu you want to convert into a mega menu
4. Click save
5. Click "configure this mega"
	5.1 Select the menu orientation
	5.2 Select the slot orientation
	5.3 Select a default sample skin or type in your own skin name
		IF CREATING YOUR OWN SKIN: You are responsible for including your CSS in your
                theme. You can create skin styles (see Styling below) in an existing css file
                or create a new CSS file (e.g. my-megamenu-skin.css) and tell your theme's .info
                file to load your skin CSS.

                When you select to use your custom skin, the name you type in will be the class
                that is appended to this mega menu's class list (.megamenu-skin-{skin name}).

A block containing your mega menu, with the styles you have specified above, has now been 
enabled.
	
6. Edit your blocks (admin/build/blocks) and place your mega menu block in a region.


******************************************************************
	Styling
******************************************************************

Now that the mega menu block is setup, the actual work begins.

Continuing from the example menu above, the corresponding megamenu structure looks like this. 
Notice the root level, or tier one, items (Library and Info Center) are referred to as parents. 
When the mouse hovers over a parent, a bin drops down. In this example, the Library bin contains 
two slots, which correspond to the second level of the menu (Newsletters and Publications). Notice
that slots are the organizational element, which contain the final link destinations. In this example, 
the slots are oriented horizontally.  They can also stack on top of each other.

 ------------------------------------------------
|  Library  |  Info Center |                     |  > Parent
 ------------------------------------------------
      ||                       
   --------------------------------------------              __
  |  -----------------     -----------------   |                \
  | | [ Newsletters ] |   | [ Publications ] | | --Slot Title    \
  | |                 |   |                  | |                  \
  | |  Newsletter 1   |   |  Publication 1   | |                    Bin
  | |  Newsletter 2   |   |  Publication 2   | |                  /
  | |  Newsletter 3   |   |  Publication 3   | |                 /     
  |  -----------------     ------------------  |                /
   --------------------------------------------              __/
    
    |                 |
     \               /
       \           /
         \       /
            Slot

And the markup looks like this (items in {} are either user supplied values or are dynamically generated):

<ul id="megamenu-{menu name}" class="megamenu-menu {menu orientation} megamenu-skin-{skin name}">
  <li class="megamenu-parent {even/odd}">
    <h2 class="megamenu-parent-title">Library</h2>
    <ul class="megamenu-bin megamenu-slots-{slot orientation}">
      <li class="megamenu-slot {even/odd}">
        <h3 class="megamenu-slot-title">Newsletters</h3>
        <ul class="megamenu-items">
          <li class="megamenu-item {even/odd}">Newsletter 1</li>
          <li class="megamenu-item {even/odd}">Newsletter 2</li>
          <li class="megamenu-item {even/odd}">Newsletter 3</li>
        </ul>
      </li>

      <li class="megamenu-slot {even/odd}">
        <h3 class="megamenu-slot-title">Publications</h3>
        <ul class="megamenu-items">
          <li class="megamenu-item {even/odd}">Publication 1</li>
          <li class="megamenu-item {even/odd}">Publication 2</li>
          <li class="megamenu-item {even/odd}">Publication 3</li>
        </ul>
      </li>
    </ul>
  </li>
  
  <li class="megamenu-parent {even/odd}">
    <h2 class="megamenu-parent-title">Info Center</h2>
    ... bin
       ... slots
          ... items
  </li>
</ul>

To style your mega menu, simply precede all rules with your skin name:
.megamenu-skin-myskin .megamenu-slot-title {
	color: red;
	font-size: 1.2em;
}

For additional specificity, IDs are assigned to every single list item in the mega menu hierarchy.
Look at the markup generated for a complete picture of the IDs and classes that are applied. 

******************************************************************
	Advanced Usage
******************************************************************
1. Create Mega Menus our of your taxonomies
   To automatically generate menu content from your sites Taxonomy structure, you can use the 
   Taxonomy Menu module (http://drupal.org/project/taxonomy_menu) which populates your Tier1 with 
   your Taxonomy ‘Vocabulary’ name and Tier2 and Tier3 with Terms hierarchically set to this Vocabulary name.

   NOTE: Your taxonomy structure must still supply 3 tiers of data, so this integration will most likely not 
   work well with free tagging. 

File

README.txt
View source
  1. ******************************************************************
  2. Contents
  3. ******************************************************************
  4. 1. Assumptions
  5. 2. Mega Menus in a Nutshell
  6. 3. How to Use This Module
  7. 4. Styling
  8. 5. Advanced Usage
  9. ******************************************************************
  10. Assumptions
  11. ******************************************************************
  12. 1. You are a Drupal themer (or understand theming)
  13. 2. Your markup and CSS are clean
  14. 3. You want more CSS control over Drupal menus
  15. ******************************************************************
  16. Mega Menus in a Nutshell
  17. ******************************************************************
  18. Read: http://www.useit.com/alertbox/mega-dropdown-menus.html
  19. ******************************************************************
  20. How to Use This Module
  21. ******************************************************************
  22. The basis of a mega menu is a Drupal menu that is three levels deep. The first level (or tier) are the
  23. parent items. The second tier are categories. Tier three menu items are the sub links grouped beneath
  24. the second tier categories.
  25. Consider the following example menu:
  26. + Library > Tier 1
  27. | |
  28. | + Newsletters > Tier 2
  29. | | |
  30. | | + Newsletter 1 > Tier 3
  31. | | + Newsletter 2
  32. | | + Newsletter 3
  33. | |
  34. | + Publications
  35. | |
  36. | + Publication 1
  37. | + Publication 2
  38. | + Publication 3
  39. |
  40. + Info Center
  41. To create a mega menu out of a menu structured in this way:
  42. 1. Enable this module just like any other Drupal module
  43. 2. Go to the mega menu configuration page: admin/build/megamenu
  44. 3. Check the enable box next to the menu you want to convert into a mega menu
  45. 4. Click save
  46. 5. Click "configure this mega"
  47. 5.1 Select the menu orientation
  48. 5.2 Select the slot orientation
  49. 5.3 Select a default sample skin or type in your own skin name
  50. IF CREATING YOUR OWN SKIN: You are responsible for including your CSS in your
  51. theme. You can create skin styles (see Styling below) in an existing css file
  52. or create a new CSS file (e.g. my-megamenu-skin.css) and tell your theme's .info
  53. file to load your skin CSS.
  54. When you select to use your custom skin, the name you type in will be the class
  55. that is appended to this mega menu's class list (.megamenu-skin-{skin name}).
  56. A block containing your mega menu, with the styles you have specified above, has now been
  57. enabled.
  58. 6. Edit your blocks (admin/build/blocks) and place your mega menu block in a region.
  59. ******************************************************************
  60. Styling
  61. ******************************************************************
  62. Now that the mega menu block is setup, the actual work begins.
  63. Continuing from the example menu above, the corresponding megamenu structure looks like this.
  64. Notice the root level, or tier one, items (Library and Info Center) are referred to as parents.
  65. When the mouse hovers over a parent, a bin drops down. In this example, the Library bin contains
  66. two slots, which correspond to the second level of the menu (Newsletters and Publications). Notice
  67. that slots are the organizational element, which contain the final link destinations. In this example,
  68. the slots are oriented horizontally. They can also stack on top of each other.
  69. ------------------------------------------------
  70. | Library | Info Center | | > Parent
  71. ------------------------------------------------
  72. ||
  73. -------------------------------------------- __
  74. | ----------------- ----------------- | \
  75. | | [ Newsletters ] | | [ Publications ] | | --Slot Title \
  76. | | | | | | \
  77. | | Newsletter 1 | | Publication 1 | | Bin
  78. | | Newsletter 2 | | Publication 2 | | /
  79. | | Newsletter 3 | | Publication 3 | | /
  80. | ----------------- ------------------ | /
  81. -------------------------------------------- __/
  82. | |
  83. \ /
  84. \ /
  85. \ /
  86. Slot
  87. And the markup looks like this (items in {} are either user supplied values or are dynamically generated):
    • Library

      • Newsletters

        • Newsletter 1
        • Newsletter 2
        • Newsletter 3
      • Publications

        • Publication 1
        • Publication 2
        • Publication 3
    • Info Center

    • ... bin
    • ... slots
    • ... items
  88. To style your mega menu, simply precede all rules with your skin name:
  89. .megamenu-skin-myskin .megamenu-slot-title {
  90. color: red;
  91. font-size: 1.2em;
  92. }
  93. For additional specificity, IDs are assigned to every single list item in the mega menu hierarchy.
  94. Look at the markup generated for a complete picture of the IDs and classes that are applied.
  95. ******************************************************************
  96. Advanced Usage
  97. ******************************************************************
  98. 1. Create Mega Menus our of your taxonomies
  99. To automatically generate menu content from your sites Taxonomy structure, you can use the
  100. Taxonomy Menu module (http://drupal.org/project/taxonomy_menu) which populates your Tier1 with
  101. your Taxonomy ‘Vocabulary’ name and Tier2 and Tier3 with Terms hierarchically set to this Vocabulary name.
  102. NOTE: Your taxonomy structure must still supply 3 tiers of data, so this integration will most likely not
  103. work well with free tagging.