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

clemens.tolboom - June 27, 2009 - 14:17
Project:Drupal
Version:7.x-dev
Component:menu system
Category:feature request
Priority:normal
Assigned:clemens.tolboom
Status:won't fix
Issue tags:d7uxsprint, ui-text usability
Description

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.

#1

clemens.tolboom - June 27, 2009 - 15:16
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.

AttachmentSize
theme-503938-1.patch 1.5 KB
Testbed results
theme-503938-1.patchfailedFailed: Failed to apply patch. Detailed results

#2

clemens.tolboom - June 27, 2009 - 15:18
Issue tags:+Usability

#3

kika - June 28, 2009 - 13:38

#4

kika - June 28, 2009 - 13:47
Issue tags:-D7UX+d7uxsprint

#5

Sutharsan - June 28, 2009 - 14:25
Assigned to:clemens.tolboom» Anonymous
Status:needs review» reviewed & tested by the community

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

#6

System Message - June 28, 2009 - 16:22
Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#7

webchick - June 28, 2009 - 17:01
Status:needs work» needs review

Don't be a ponce, testing bot.

#8

clemens.tolboom - June 29, 2009 - 13:56
Category:task» feature request

#9

catch - July 2, 2009 - 11:33
Status:needs review» needs work

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

#10

clemens.tolboom - July 2, 2009 - 12:21

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

catch - July 2, 2009 - 12:27

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

#12

clemens.tolboom - July 6, 2009 - 09:02
Assigned to:Anonymous» clemens.tolboom

#13

clemens.tolboom - July 18, 2009 - 15:01
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'

AttachmentSize
theme-503938-13.patch 2.19 KB
Testbed results
theme-503938-13.patchfailedFailed: Failed to apply patch. Detailed results

#14

System Message - July 21, 2009 - 16:00
Status:needs review» needs work

The last submitted patch failed testing.

#15

clemens.tolboom - August 30, 2009 - 15:08
Status:needs work» needs review

Not sure why this test failed.

#16

System Message - August 31, 2009 - 07:35
Status:needs review» needs work

The last submitted patch failed testing.

#17

clemens.tolboom - September 1, 2009 - 11:57
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.

AttachmentSize
theme-503938-17.patch 2.19 KB
Testbed results
theme-503938-17.patchfailedFailed: 12710 passes, 5 fails, 3 exceptions Detailed results

#18

System Message - September 1, 2009 - 12:12
Status:needs review» needs work

The last submitted patch failed testing.

#19

clemens.tolboom - September 1, 2009 - 12:14
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

clemens.tolboom - September 1, 2009 - 12:16
Assigned to:Anonymous» clemens.tolboom

#21

clemens.tolboom - September 20, 2009 - 14:53
Status:postponed» 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 :)

 
 

Drupal is a registered trademark of Dries Buytaert.