New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Showing the revised menus

From: Drupal 7 New Features

Video: Showing the revised menus

Drupal's menu system got a substantial overhaul in version 7, which is good, because it tended to be kind of confusing in Drupal 6. If we go up to our Drupal 6 tab here and go to our menus we click Administer > Site building > Menus, you can see that there are only three menus by default Navigation, Primary links, and Secondary links. Those three they don't really mean anything from their names. It's hard to tell what a primary link is and what a secondary link is. In Drupal 7 however there are now four menus and we get to that by going to Structure and Menus.

Showing the revised menus

Drupal's menu system got a substantial overhaul in version 7, which is good, because it tended to be kind of confusing in Drupal 6. If we go up to our Drupal 6 tab here and go to our menus we click Administer > Site building > Menus, you can see that there are only three menus by default Navigation, Primary links, and Secondary links. Those three they don't really mean anything from their names. It's hard to tell what a primary link is and what a secondary link is. In Drupal 7 however there are now four menus and we get to that by going to Structure and Menus.

Those four menus tend to be better labeled. Main menu, well, that's fairly clear, Management, Navigation, and User menu. We are going to go through all of these and show you exactly what's in them. The first one, Main menu, has only one item in it which we get to by clicking on List Links > Home. Well, that should look familiar to you. If I close my administrative overlay here, it's this menu up here. In Bartik, items in that menu show up as tabs which I think is quite nice. Let's go back and take a look at our menus by clicking Structure > Menus. The Management menu is the big menu that you see over here on the left-hand side.

Now, this is very much like Drupal 6. I'll go to that menu by going to Drupal 6, click on Navigation, and you see all of the links. This is all of the stuff down here, which you remember expands as you go. It makes this left side kind of difficult if you're an administrator. Now, on Drupal 7 a lot of that stuff has been replaced by the toolbar and other administrative features. But you could in fact make this Administer menu pop out just as you did in Drupal 6. What you do is you'd go up to Structure and Menus and then List Links.

Over here you could then expand any one of these. Let's say I wanted to expand the Administer menu,. Click edit, scroll down a little bit and Show as expanded. By the way, this screen where you added a particular link in a menu is not really very different from Drupal 6, so we don't have to go through it. In this case, I'll click Save then go back to our front page and you will see it expanded my much like in Drupal 6. I am going to go back up and change it back by clicking Structure > Menus > Management list links and then back again to that Administer and reset.

This is a nice little feature for any of the built-in menus. You could send it back to its default configuration by clicking reset. You could also go into edit and uncheck the box that you just checked, but I'll just say reset, and yes I do want to lose my customizations and go back. Going back to our full menus list, Structure and Menus, the last one we have is this User menu. When we list the links we see two items. The first, one although it's says admin now, it will show the username. It's the thing that we have up here in the right-hand corner of the screen, admin, and then the other one of course is, Log out.

Now, if you do log out then you'll see something quite different and I'll show you that. It disappears entirely while the logging block, which is over here, then it pops into play. I am going to just sign back in again and there we are. This is a case of a menu that's built-in that sort of contextual. It can tell what's going on. Now some of these menus show up in specific places based on the theme and enabled modules that don't have anything to do with blocks. For example, this menu here shows up also in the toolbar.

But every menu that you create also appears as a block, and I can show that by going to Structure > Blocks. By default, some of them are placed in specific places. For example, we have a Navigation menu here in Sidebar first, right above the Management menu and you saw that just a minute ago. Here, it is the Management menu. The Navigation menu isn't showing up because there are no links that the administrator would use. There's one other new feature in menus in Drupal 7 which I think is really neat and we talked about this a little bit when we showed content creation in this course.

Let's go into this node and edit it. I'll just click on our little contextual menu here and say Edit. Now, this is of the content type Vacation package. Scroll down to the bottom, and see our Menu settings. Now, you might remember in Drupal 6 if you edited a node and you clicked on OK, which menu do I want this to be in, you would get this big pop up that would show you all of the menus. And it was really overwhelming. Well, here we only see the Main menu. Well, how does that happen? The answer is it happens in the content type.

If we go up to Structure and Content types and then to edit Vacation package, remember we were just looking at a node of the Vacation package type. We can scroll to the bottom and change our Menu settings. Now, we can choose which menus show up when we're editing a node of that content type. So, let's say that we want to not put it in Main menu, but instead want to put it in User menu, and Save content type. Now, when we go back and edit that node, we scroll to the bottom and look at our Menu settings, we have a different group of options of where we can put it.

That makes it a lot more manageable if you have other people creating content, because this way you won't have links all over the place. I think Drupal's new menu system is a lot better, but it's enormous flexibility can add to some of the confusion. The default values are a lot better than in Drupal 6 and you are not faced with that huge list of mostly irrelevant choices when you want to create a menu item. The important thing to remember is to go and edit the content type as I did just a minute ago in order to determine where people can put links to nodes of a particular content type.

Show transcript

This video is part of

Image for Drupal 7 New Features
Drupal 7 New Features

29 video lessons · 7875 viewers

Tom Geller
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.