Download & Extend

Default menu "Parent item" should be Navigation, not Primary links

Project:Drupal core
Version:7.x-dev
Component:menu system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Usability

Issue Summary

I'll bet you $1 that the typical Drupal admin wants typical new menu items to appear in the left navigation menu, not in primary links: As highlights and having limited space, Primary links must be exceptional and planned. Navigation is the workhorse for run-of-the-mill menu items.

Therefore, the pre-selected Parent item when creating a new link should be Navigation, not Primary links.

This combined with #322703: Use on/off checkbox to enable node's menu item and #483078: Menu item name should be node title by default will make menus a really easy, "it just works" feature that will involve a single checkbox in the vast majority of cases.

Comments

#1

Forgot Usability tag.

#2

Agreed.

#3

Status:active» needs review

Aren, attached you'll find a patch which does this. As long as Bojhan agrees, I do too :)

AttachmentSizeStatusTest resultOperations
navigation-as-default-menu.patch2.69 KBIdleFailed: Failed to apply patch.View details

#4

Category:feature request» task
Status:needs review» reviewed & tested by the community

Looks good.

#5

Agreed, this should cause more natural behavior in using Navigation.

#6

#7

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

#8

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#10

Status:closed (fixed)» needs review

It seems there was a mistake in the patch committed: the default source for the main links was set to 'navigation'. Four problems here:
1. It was probably an accidental change.
2. Ironically, this defeats the original intention, "Primary links must be exceptional and planned."
3. It contradicts the help screen, which says "The Main menu is the default source for the Main links".
4. menu.inc continues to think that, by default, the source for the main links is 'main-menu'.

Here's a patch to undo that change.

AttachmentSizeStatusTest resultOperations
default-for-primary-links.diff1.2 KBIdlePassed: 14628 passes, 0 fails, 0 exceptionsView details

#11

Category:task» bug report

#12

@mooffie: I think I understand the bug you found, but I'm not entirely sure, because you squeezed the actual bug report into a few words in your first sentence only. Could you clarify, please?

#13

@sun,

Drupal has a variable, 'menu_main_links_source', that points to the menu that serves as the source for the primary links. In other words, when Drupal wants to fetch the primary links, it looks for the menu pointed at by this variable. This variable, by default, is supposed to point to the 'main-menu' menu. (This 'main-menu' is empty on a new Drupal installation.)

If you visit ?q=admin/help/menu, the help page, you'll see this summed up in the following words: "The Main menu is the default source for the Main links".

Now,

The patch that was committed says that the 'menu_main_links_source' variable should point to the 'navigation' menu by default. But it should point to 'main-menu' by default.

#14

Status:needs review» reviewed & tested by the community

Thanks for clarifying, moofie! So this patch seems to be correct.

Since it is based on a variable, there's nothing we could test here.

#15

Status:reviewed & tested by the community» fixed

Hey, mooffie's back! :D Awesome!

Committed to HEAD.

#16

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.