开发者

How do you set up drupal menus?

I've had this issue numerous times on sites using drupal and not really found a way that feels right when building menus. Take an example such as this

Primary Navigation [i.e. top of the page]

  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5

Then within each Item there would be a secondary menu specific to it:

Item 1 Pages

  • Link 1
  • Link 2
  • Link 3

Item 2开发者_如何学运维 Pages

  • Link 1
  • Link 2
  • Link 3

The links on item 1 and item 2 are not the same, thus they have to be independant of each other.

I think it's standard navigation for site, primary navigation and localised secondary navigation.

What is the "Drupal" (or correct?) way of doing this?


install the Module "Menu block", and be done with it. You owe me a pint. :-)


I don't really get the root of the problem...

Go to /admin/build/menu, where you can add a new menu or modify an existing one (drag and drop, can't be easier).

When adding new content, you can also specify its parent as a menu (sub)item, so that it's inserted in the menu straight away.

Have a look at the navigation menu - the entire administrator menu/submenu set is an example of how it would look like ;)


You may want to consider the Cutemenu module to save yourself some work. I've used it with success and little work effort. Just use Primary for all of your links, and then use the nesting feature of Menus to put the proper submenu items under each main item. After that, it's just a matter of customizing the CSS to match your theme (the default Cutemenu styling is pretty awful).


If the problem is just that you want an easy way to have local navigation, then Drupal makes that simple. Just put all your items into one hierarchical menu (Primary Links will work fine, but it doesn't really matter), then go to /admin/build/menu/settings. On the bottom option, "Source for the secondary links", you'll see a note:

"You can choose the same menu for secondary links as for primary links (currently Primary links). If you do this, the children of the active primary menu link will be displayed as secondary links."

Therefore, just change Source for Primary Links and Source for Secondary Links to the menu you just added all your items to, and then in your theme, print primary links where you want your top level nav to go and print secondary links where you want your local nav to go.


I am using Drupal 7 - and danland - not customize. The main menu only shows one level and will not show the sub menu items

They will show if I put them in the secondary area .. not really useful --- I am sure it is a stupid mistake on my part but I can't get it to work.

Installed menu blocks - this gave me the sub menu on the secondary area. ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜