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

clemens.tolboom’s picture

Status: Active » Needs review
StatusFileSize
new1.5 KB

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.

clemens.tolboom’s picture

Issue tags: +Usability
kika’s picture

kika’s picture

Issue tags: -D7UX +d7uxsprint
sutharsan’s picture

Assigned: clemens.tolboom » Unassigned
Status: Needs review » Reviewed & tested by the community

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

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

webchick’s picture

Status: Needs work » Needs review

Don't be a ponce, testing bot.

clemens.tolboom’s picture

Category: task » feature
catch’s picture

Status: Needs review » Needs work

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

clemens.tolboom’s picture

afaik we need count because in line 1941

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

is set to an empty array and

// includes/menu.inc
function menu_main_menu() {

returns an array.

But I haven't tested the toggle_main_menu yet :(

catch’s picture

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

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom
clemens.tolboom’s picture

Status: Needs work » Needs review
StatusFileSize
new2.19 KB

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

Status: Needs review » Needs work

The last submitted patch failed testing.

clemens.tolboom’s picture

Status: Needs work » Needs review

Not sure why this test failed.

Status: Needs review » Needs work

The last submitted patch failed testing.

clemens.tolboom’s picture

Status: Needs work » Needs review
StatusFileSize
new2.19 KB

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.

Status: Needs review » Needs work

The last submitted patch failed testing.

clemens.tolboom’s picture

Assigned: clemens.tolboom » Unassigned
Status: Needs work » Postponed

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

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom
clemens.tolboom’s picture

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 :)