11

I'm not much of a Drupal Ninja; from what I saw at http://drupal.org/node/788972,
Drupal seems to have a menu structure like Joomla, in the sense that it allows menu items to be created under menu categories. Why are we using this unlike a central menu items section, from which we can link an item to multiple menus, if needed?

This is what I can see in Wordpress. In the latter method, I can see reduced redundancy and a single point to change multiple occurrences of the same link.

I would like to understand the logic/reasoning behind the Drupal menu structuring, not understanding how Drupal compares to Joomla or WordPress.

  • This is not the type of question you are likely to get an exact answer for so I would probably refrain from down voting anyone game enough to have a go at answering it. – rooby Apr 21 '13 at 7:49
  • If you want to know for sure, go find chx on IRC and ask him. He is the author of the current menu system. – rooby Apr 21 '13 at 8:01
  • @rooby, Thanks for your efforts. The other two answers didn't even try to answer my question. It was only telling how the current menu system worked. Also thanks for pointing me to the current menu system developer. – saji89 Apr 22 '13 at 7:40
  • Thanks to you I now noticed that @paul-m had edited his answer to include more information. I have now upvoted it. – saji89 Apr 22 '13 at 7:42
2

You can create as many menu items as you want and have them point wherever you want. You can do this in code and in the UI.

Drupal menus have plenty of flexibility, especially with contrib.

More:

You can set up many different menus (and not just one overall hierarchy) because that way you can have more than one menu. You can put them wherever you want on the page. You can have a sidebar menu and a top-strip menu and whatever else.

Internally, the menu system is really a routing system. Drupal uses the same set of code for routing requests as it does for presenting menus in web pages. Each route/item can have its own permissions, so the list of items the user sees is determined by their role, automatically.

In short, to recap: The reasoning behind Drupal menu structuring is that it's flexible.

  • Thankyou for posting an answer. But, this does not answer my question. I would like to know "the logic/reasoning behind the Drupal menu structuring". – saji89 Feb 14 '13 at 4:25
  • 1
    Actually it does answer your question. Drupal menus are structured however you choose, so the logic is up to you. – paul-m Mar 1 '13 at 18:50
  • Could you please elaborate your answer to make your statement more clear. As stated I'm not much into Drupal, so if you could take some time to explain things I'll be most thankful for your time and efforts. – saji89 Mar 2 '13 at 8:55
1

The way you see this working is purely the way the menu UI has been written. The way menus are structured in the database allows for all sorts of other possibilities, which anyone could make a module to do.

I assume (I don't know because I was not involved with the building of the menu module and I have not ever investigated this):

The reason is that in drupal the menu UI centres around menus, not menu items.

This is because you generally have one or more menus that you want to display around the site, so you add menu items to a given menu.

The alternative is that everything revolves around menu items (paths) and you go to a path and say "I want this path to be in all these menus".

I would say the decision was made (if it was even a decision. It is quite possible it was just written this way and no one questioned it) based on perceived use cases.

Personally, I can see more use cases for managing menus at the menu level than at the menu item level. Rarely would I ever want to see all menus that a menu item is in. Usually I just want to manage a menu, then put it where it has to go in the layout. It is a discrete menu, so it is managed that way.

I can see there would be some use cases for seeing all menu items for a given page, but I definitely think it is less common than wanting to see what menu items are in a menu.

Views has menu item support so it is very easy to create a menu item view that would present the alternative UI.

  • +1, Thanks for trying to answer my question, and for pointing me in the right direction. – saji89 Apr 22 '13 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.