Creating Submenus
Creating a second-level menu, a submenu, is as easy as creating all the other menus. The difference is that a submenu is contained in the same menu module as its parent menu.
You make submenus by simply creating new menu items and assigning them to be children of a parent menu item or by copying entire menu items into another menu item.
To create a drop-down submenu:
- Choose Menus > Recipes Menu.
- Select all the menu items in the Menu Item Manager for recipemenu.
- Click Copy.
- In the Copy to Menu list, select mainmenu.
This copies all the menu items into the mainmenu, preserving all the item layout types (Figure 4.87).
Figure 4.87 The Copy Menu Items page
- Click Copy.
The menu items all are copied over to the Main menu, and the Main Menu Item Manager opens.
- Click the Today’s Recipe link.
- In the Menu Item Details area, select Recipes from the Parent Item list, and leave all other items at their defaults.
By selecting Parent, you are telling Joomla that all the menu items need to be submenus of the Recipes menu item (Figure 4.88).
Figure 4.88 Changing the parent item
- Click Save.
Today’s Recipe now displays under its parent menu item of Recipes (Figure 4.89).
Figure 4.89 Today’s Recipe as a submenu
- Copy the menu items Main Dishes and Desserts by repeating steps steps 6 through 8, so the remaining copied menus items are submenus under Recipes.
- Click Preview.
When you hover over Recipes in the Main menu, the submenu appears (Figure 4.90).
Figure 4.90 Hovering over the Recipes menu