You are here

README.txt in Megamenu 7

Same filename and directory in other branches
  1. 6.2 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Configuration
 * Styling
 * Advanced usage


INTRODUCTION
------------
Read: http://www.nngroup.com/articles/mega-menus-work-well/


CONFIGURATION
-------------
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/config/user-interface/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 have two options
    1. Follow the on-screen directions to upload your skin to the files directory
    2. Create your own CSS in your theme and include it in your theme.info file.

A block containing your mega menu, with the styles you have specified above,
has now been enabled.

6. Edit your blocks (admin/structure/block) 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;
}


ADVANCED USAGE
--------------

1. Create Mega Menus our of your taxonomies
   To automatically generate menu content from your sites Taxonomy structure,
   you can use "Taxonomy Menu" module 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. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Configuration
  5. * Styling
  6. * Advanced usage
  7. INTRODUCTION
  8. ------------
  9. Read: http://www.nngroup.com/articles/mega-menus-work-well/
  10. CONFIGURATION
  11. -------------
  12. The basis of a mega menu is a Drupal menu that is three levels deep. The first
  13. level (or tier) are the parent items. The second tier are categories. Tier
  14. three menu items are the sub links grouped beneath the second tier categories.
  15. Consider the following example menu:
  16. + Library > Tier 1
  17. | |
  18. | + Newsletters > Tier 2
  19. | | |
  20. | | + Newsletter 1 > Tier 3
  21. | | + Newsletter 2
  22. | | + Newsletter 3
  23. | |
  24. | + Publications
  25. | |
  26. | + Publication 1
  27. | + Publication 2
  28. | + Publication 3
  29. |
  30. + Info Center
  31. To create a mega menu out of a menu structured in this way:
  32. 1. Enable this module just like any other Drupal module
  33. 2. Go to the mega menu configuration page: admin/config/user-interface/megamenu
  34. 3. Check the enable box next to the menu you want to convert into a mega menu
  35. 4. Click save
  36. 5. Click "configure this mega"
  37. 5.1 Select the menu orientation
  38. 5.2 Select the slot orientation
  39. 5.3 Select a default sample skin or type in your own skin name
  40. IF CREATING YOUR OWN SKIN: You have two options
  41. 1. Follow the on-screen directions to upload your skin to the files directory
  42. 2. Create your own CSS in your theme and include it in your theme.info file.
  43. A block containing your mega menu, with the styles you have specified above,
  44. has now been enabled.
  45. 6. Edit your blocks (admin/structure/block) and place your mega menu block in a
  46. region.
  47. STYLING
  48. -------
  49. Now that the mega menu block is setup, the actual work begins.
  50. Continuing from the example menu above, the corresponding megamenu structure
  51. looks like this. Notice the root level, or tier one, items (Library and Info
  52. Center) are referred to as parents. When the mouse hovers over a parent, a bin
  53. drops down. In this example, the Library bin contains two slots, which
  54. correspond to the second level of the menu (Newsletters and Publications).
  55. Notice that slots are the organizational element, which contain the final link
  56. destinations. In this example, the slots are oriented horizontally. They can
  57. also stack on top of each other.
  58. ------------------------------------------------
  59. | Library | Info Center | | > Parent
  60. ------------------------------------------------
  61. ||
  62. -------------------------------------------- __
  63. | ----------------- ----------------- | \
  64. | | [ Newsletters ] | | [ Publications ] | | --Slot Title \
  65. | | | | | | \
  66. | | Newsletter 1 | | Publication 1 | | Bin
  67. | | Newsletter 2 | | Publication 2 | | /
  68. | | Newsletter 3 | | Publication 3 | | /
  69. | ----------------- ------------------ | /
  70. -------------------------------------------- __/
  71. | |
  72. \ /
  73. \ /
  74. \ /
  75. Slot
  76. And the markup looks like this (items in {} are either user supplied values
  77. or are dynamically generated):
    • Library

      • Newsletters

        • Newsletter 1
        • Newsletter 2
        • Newsletter 3
      • Publications

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

    • ... bin
    • ... slots
    • ... items
  78. To style your mega menu, simply precede all rules with your skin name:
  79. .megamenu-skin-myskin .megamenu-slot-title {
  80. color: red;
  81. font-size: 1.2em;
  82. }
  83. ADVANCED USAGE
  84. --------------
  85. 1. Create Mega Menus our of your taxonomies
  86. To automatically generate menu content from your sites Taxonomy structure,
  87. you can use "Taxonomy Menu" module which populates your Tier1 with your
  88. Taxonomy ‘Vocabulary’ name and Tier2 and Tier3 with Terms hierarchically set
  89. to this Vocabulary name.
  90. NOTE: Your taxonomy structure must still supply 3 tiers of data, so this
  91. integration will most likely not work well with free tagging.