Adding a Content Item to a Menu

There are two approaches for adding items to menus: you can use the menu administration form (see figure 5-4) to create a new menu item, or you can create a menu link from the content item that you wish to reference from within the form used to create or edit that content item. The best practice is to use the content creation form (see figure 5-3) or, as we will see later in the book, other element creation forms such as a panel page or a view. The reason for using this approach is that when you delete that content item, Drupal automatically removes the item from the menu to which it was assigned. If you use the manual approach of creating a menu item using the menu administration form, you as the site owner must remember to remove that item manually from the menu.

To create a new content item, click on any of the Create Content links that are available on the home page of your website (assuming you are still logged in as the administrator), and select the "Basic page" content type. As an example, enter a title and body for the new content type and then click on the "Provide a menu" vertical tab at the bottom of the screen (see Figure 5-3). Check the "Provide a menu" box, which reveals the fields for defining your menu. Enter the title for the item as you wish it to appear on the menu, and select the main menu as the one where you want the item to appear. After entering the values for your menu item, click on the Save button at the bottom of the page. Drupal then displays the page that you just created, with the menu item associated with this page now appearing in the Main menu at the top right of the darker blue area of the page.

Figure 5-3. Adding a content item to a menu

Clicking on that link will take you directly to the page we just created, regardless of where you are on the website.

Was this article helpful?

0 0
Article Marketing Knockdown

Article Marketing Knockdown

The lifeblood of any online business is in being able to generate highly targeted, consistent traffic to your websites, landing pages and squeeze pages.

Get My Free Ebook

Post a comment