New Menu and Block

in
In Drupal, blocks and menus can be tightly linked.

This exercise will show you how to:

  • create a new Menu item (block)
  • move (existing) menu-links to your new Menu block
  • place it in the region you want

Menu Changes wanted

Drupal new menu plan This image here shows what I want: which is to move some existing menu-links into a new menu.

Create a new Menu

Administer > Site Building > Menus > Add menu[tab]
When you create a Menu in Drupal, it automatically will show up as a 'block' in Administer > Site Building > Block section, and from there you can place it in the region you want.
The fields you fill in:
Field I entered.. Comment
Menu name site-info Required. Only lowercase letters, numbers, hyphens. Must be unique. This is the machine-readable name of this menu item.
Title Site Info Required. This is the label or name for the 'block' which will contain the items in this menu.
Description. Menu for site info like About Us, Contact Us, Privacy Policy, etc. Optional. This is an internal description for your benefit only. It will help you remember what this menu is for.
Once you have finished filling in the fields, click Save.

new Drupal menu addedYou will now see the newly created menu "Site Info" show up in the admin navigation, under Menus.

Move Existing menu-links to new Menu

As you can see, I want to move some links from the Secondary Links section into our new menu "Site Info".
To move them from the Secondary links menu, go to:
Administer > Site Building > Menus > Secondary links

Drupal menu links

Click edit for each of the menu links to be moved.
When you are in the 'Edit menu item' page, you will need to change the 'Parent item' from <Secondary links> to our new <Site Info>. Save.
This now effectively says that that the 'parent' menu for that link is now our new menu "Site Info".
Do that for each fo the relevant links to be moved to the new menu.

Move new Menu block to desired Region

Now even though you have moved the menu links from the 'Secondary links' menu to our new "Site Info" menu, your users will still not be able to see that on your website.

As mentioned above, when you create a new Menu, it automatically is a 'block' which can be moved to a 'region' of your choice. However you have to enable that menu-block so that it can be visible.

Drupal disabled blocksAdminister > Site building > Blocks
Here you will see that our menu-block "Site Info" is under the 'Disabled' blocks section.

Just click and hold on the four-sided arrow and drag to the region you want.

Drupal menu place in region In my case, I have moved it to the left sidebar, below the User login. And once you 'Save blocks', your new menu will be visible on your site.

So now the old links have been removed and moved into the new menu:

Drupal with new menu

If you want to change the order of the links in a menu, just go to:
Administer > Site building > Menus > (click the appropriate menu) > re-arrange the order of the links.

You can also click on the configure link next to a 'block' in Administer > Site buidling > Blocks to specify the appearance of that 'block' (e.g. should it be shown to all users, should it only appear on certain pages).

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

 

Healthful Soulful Things

Custom Search