I'll try to keep this as short as possible. I'm new to Drupal and in the process of converting a site I have developed using Wordpress as a CMS over to Drupal. Most of the site uses the static Wordpress "Page" to keep content for the site. The site's navigation structure goes about 4-5 levels deep, however the top two levels are displayed in the header by way of a vertical drop-down menu that is created dynamically. My question is what is the best way to go about recreating the site's navigational structure? If I 4 top-level menus and each have some submenus do I just need to create content > page. I guess I'm a little confused about creating navigation and content. In wordpress as I create a "Page" and add content to it, if it is a top-level page (no parent), it (the page title) gets added to the top of my navigation drop-down menu. If it's one level below the top-level it becomes is part of the drop-down menu and will fall under the parent page I associate it with. It seems like in Drupal, correct me if I'm wrong, I need to first create the navigation structure through Administer > Menus and then create content (page) and somehow apply that page to it's menu I create. So for example if I'm wanting to create an Organization page that would be a subpage of About Us, would I need to create both the About Us and Organization menus and then create an Organization page and somehow tie that into the Organization menu? I hope that this makes sense. I'm just a bit confused at the moment. Maybe someone out there can point me in the right direction or recommend a book or tutorial that could help me. Thanks!!

Comments

occupant’s picture

I'm no expert, but I'll try to shed a little light. I had the same questions when I first started tinkering, and I found the best way to approach it was to create Menu Blocks for each of my top-level pages then create the Page. Then, the sub-pages, assigning them as children of the same menu blocks. And so on for my deeper levels of navigation. So create an About Us menu block, then the About Us page, assigning it to the About Us menu block. That took care of my main structure.

For my Primary Links and dropdowns (I defined my own instead of using the preexisting block), I made aliases to my primary and secondary navigation. EDIT Whoops, wrong link :)

The reason I did it this way, instead of defining my primary pages as children of the default Primary Links block is that I was finding that my active class was getting messed up; for some reason it would get confused that my About Us page in my subnavigation block was an alias and not display the active class that lets me style the current active link.

I hope that makes sense.

bgajus’s picture

So when you say create a 'menu block' are you saying go to Administration > Menus > Add Menu Item?
Or are you talking about going to 'Blocks" under site building and creating a new block first?

yan’s picture

When you create a menu through Administer -> Site Building -> Menus -> Add Menu it is automatically provided as a block that you can show in any region through the blocks administration.

thx538’s picture

First go to /admin/build/menu/add and create a new menu.

Then when you create some content, you will be able to create a new menu entry (see menu settings on the content creation area), and assign it to the new menu you just created, or (hierarchically) to any entry you have created in your test menu.

Now if you go to admin/build/block you will see that a block has been created with you new menu and you can place this block wherever you want in your page.

This works for Drupal 6, not sure about older versions.

You can also use the book module which is aimed at creating a hierarchy of pages, with navigation available inside the content area.

yan’s picture

Just for general understanding: In Drupal, the menu items are not dependent on content. You can create a menu item manually and put any custom URL to link to. Doing this, you can order your menu items in a tree-like hierarchy.

Another way to create menu items is when you create a node. There's a option called "Menu settings". If you put something there, a menu entry will be made for the node.

bgajus’s picture

So when you go to Admin| Build | Menus, you have a choice between adding an item to 'Primary Links' or 'Navigation'..........what's the difference and is one of those where I should start building my site's hierarchy ????? Or are you guys all saying I'm basically needing to create a new section that my menus would fall under?

yan’s picture

The default menus provided are Primary and Navigation. If you add a menu item to Primary links, it (usally) appears in the top region of your site. The Navigation menu just shows up for logged in users (and just the links that the user role is allowed to see).

You can easily add a new menu which is then provided as a block. If I understand correctly, that is what you want to do. Create a new menu and then add menu items to it. Then go to Admin -> Build -> Blocks and set the new menu (which should appear in the blocks list) to a region, for example to the left one.

You can point a menu item anywhere you like to. This can be a node, a taxonomy term, or a view, for example. Just put the URL you want to point it to.

drupalferret’s picture

I have been grappling with how to understand the menu problem for serveral days now. Like you I am used to other systems (wordpress, joomla, zencart etc) which are more intuitive than drupal when it comes to putting a website together.

I have learned if you go into the admininster>Site Building>Menus you have a few options. You can add menus to the existing ones (Primary Links, Navigation etc) or you can create your own custom one. So for example you can create MYNEWNAV as the Menu container then inside put all your top level links. Then you can put your next level of links and assign a parent from your top level links. Then you can put your next level of links and assign a parent from your sub level links and so on. This way you can build your structure in a similar way to wordpress. Each time you add a page, you choose the menu item which you want it to appear under (it is in there as an option).

One other thing to remember is to make sure the Expanded box is ticked in Menus to show the sub levels.

Now you will come across another problem which had me floored for days. The expanded box is ticked, it has sublinks and sub sub links, but none of them show up - only the top level. There is nothing wrong with your installation. This is purely a theme issue and is not built into the theme. Javascript dropdown menus, rollovers etc all have to be coded into your theme in order to show them. I thought this was weird because it is a basic requirement of a website, but I guess there is a reason for it. And your new menu will not automatically replace the primary links menu - you have to change the theme as far as I can tell and change the php code to call your new menu instead.

Another issue you may come across is where I find myself now. I do not want to add every page created to the menu for a "Category". Someone suggested I use views which is great because it contains the ability to create menu item links. But the question then becomes - do you use Menu or Views to create the navigation structure.

Hope this helps - I have only been using drupal for a few days.

jsmart377’s picture

All the above was fine but what I was struggeling most with was when creating a new menu, I had no node number (chicken before egg syndrome!). I finally just realized by reading the fine print under the 6.x Create Menu there is the option to use "node/add" where I assume Drupal adds the new node required on the fly. Now I am off the the menu building race!!