Download & Extend

Users Set the Parent Menu Item to "Add a main menu item"

Project:Drupal core
Version:7.x-dev
Component:menu system
Category:feature request
Priority:normal
Assigned:clemens.tolboom
Status:closed (won't fix)
Issue tags:d7uxsprint, ui-text usability

Issue Summary

From http://drupalusability.org/node/123 we want to solve this with

Solution:
The "Add a main menu item" item should not be a real menu item. Instead it should be added through the theme layer when the menu is being displayed and the menu is empty.

Comments

#1

Status:active» needs review

Patch contains a theme.inc check for an empty 'main_menu' and add the appropriate link taken from the removed menu_add in default.profile. Switching theme still shows the link for the main menu.

AttachmentSizeStatusTest resultOperations
theme-503938-1.patch1.5 KBIdleFailed: Failed to apply patch.View details | Re-test

#2

Issue tags:+Usability

#3

#4

Issue tags:-D7UX+d7uxsprint

#5

Assigned to:clemens.tolboom» Anonymous
Status:needs review» reviewed & tested by the community

Patched tested and checked. Works as advertised.
Unassigning Clemens.

#6

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#7

Status:needs work» needs review

Don't be a ponce, testing bot.

#8

Category:task» feature request

#9

Status:needs review» needs work

Looks great but the !count() should be an !isset().

#10

afaik we need count because in line 1941

<?php
  $variables
['main_menu']         = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
?>

is set to an empty array and
<?php
// includes/menu.inc
function menu_main_menu() {
?>

returns an array.

But I haven't tested the toggle_main_menu yet :(

#11

Sorry, missed that, but in that case empty() should be fine.

#12

Assigned to:Anonymous» clemens.tolboom

#13

Status:needs work» needs review

- moved theme.inc code a few lines up
- included test for toggle_main_menu
- wrapped t() arround 'Add a main menu link'

AttachmentSizeStatusTest resultOperations
theme-503938-13.patch2.19 KBIdleFailed: Failed to apply patch.View details | Re-test

#14

Status:needs review» needs work

The last submitted patch failed testing.

#15

Status:needs work» needs review

Not sure why this test failed.

#16

Status:needs review» needs work

The last submitted patch failed testing.

#17

Status:needs work» needs review

Rebuild patch

* The menu-item "Add a main menu item" for main-menu is just a link added through theme.inc
* When adding a menu-item to the main-menu this link disappears.
* When removing _all_ menu-items from main-menu this link appears.
* This is only available when main-menu is configured to show up.

AttachmentSizeStatusTest resultOperations
theme-503938-17.patch2.19 KBIdleFailed: 12710 passes, 5 fails, 3 exceptionsView details | Re-test

#18

Status:needs review» needs work

The last submitted patch failed testing.

#19

Assigned to:clemens.tolboom» Anonymous
Status:needs work» postponed

Bojhan adviced to postpone this feature. This feature is now confusing with regard to the toolbar.

#20

Assigned to:Anonymous» clemens.tolboom

#21

Status:postponed» closed (won't fix)

According to #582734: Removal of Add a main menu link this could be closed. #473268: D7UX: Put edit links on everything adds links for everything :)

nobody click here