Adding Nice Menus Support

Nice Menus is a lovely module that extends the Drupal menu system so that it allows drop down and collapsing menus.

The default recommended way for using menus is to use blocks, and Nice Menus is very easy to configure as a block. However, if you've already built your page using a Zen subtheme and the main menu system, or you categorically feel that blocks are not the way to go for your site, then you need to change the page generation code in your subtheme. This little guide mentions the steps necessary to enable Nice Menu support on your Zen subtheme on the Drupal 7 series.

Getting started with Drupal 7 administration

This section is an introduction to site administration for new Drupal 7 users. It covers the use of the administrator account and offers suggestions on where to start.

Menu items that are not links

Drupal's menu system lets you define an arbitrary number of menu items in a hierarchy, each of which is a link to somewhere in the site (or on another site). That's great, unless you want to have a menu tree that has items in it which are not, in fact, links. Several scenarios for this exist, including parent categories and section separators.

This page explains how to add "menu links" that will not actually link anywhere.

Modules

Modules that allow links that are not links:

Theme layer: Drupal 5

Alternatively, this can be accomplished in your theme:

Step 1

We will define the magic value <none> to mean "a path to nowhere", just like <front> means "the home page". The crucial part here is the theme_menu_item_link() function, which we will override. Place the following function in your template.php file.

<?php
function phptemplate_menu_item_link($item, $link_item) {
if ($item['path'] == '') {
$attributes['title'] = $link['description'];

Working with Menus

Menus are a collection of links (menu items) used to navigate a website. The Menu module provides an interface to control and customize the powerful menu system that comes with Drupal. Menus are primarily displayed as a hierarchical list of links using Drupal's highly flexible blocks feature. Each menu automatically creates a block of the same name. By default, new menu items are placed inside a built-in menu labeled Navigation, but administrators can also create custom menus.

Drupal 7

Uses

In Drupal 7, you can add, remove and rename menus and menu items/tabs. You can also configure a special block for a menu and you can specify the default menu to which new items will be added.

In many themes there are at least two menus, the Main (or primary) menu, and a secondary menu. The Main menu's links drive the main navigation structure for your site, and are often displayed prominently across the top or side of the site. The Secondary menu is often used for items like the copyright and privacy notices and are often displayed at the bottom or very top of the page in smaller text. You can specify which menus are used for the main and secondary links.

When adding or editing site content, you can also specify the content's menu item. You can specify a default menu for the content authoring form.

Taxonomy menu: navigation for terms

Taxonomy terms allow classification of content into categories and subcategories. The taxonomy menu module adds links to the navigation menu for taxonomy terms. This is useful when the community is focused on creating content that is organized in a taxonomy.

Subscribe with RSS Subscribe to RSS - menus