Hello,

I'm working on exporting and importing menus. Those menus contains levels and sublevels.
I'm using menu_firstchild for each of these sublevels.

The problem is when I export those menu items, there is only one menu item '<firstchild>' exported.
This is because the export is based on the path.

My idea is to add the possibility to add a new argument in the parameter, so the path will be unique, like this:

  • <firstchild>/1
  • <firstchild>/2
  • <firstchild>/bla

The patch is following.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pol’s picture

Status: Active » Needs review
FileSize
3.06 KB

Patch for latest 7.x-dev version.

Pol’s picture

Issue summary: View changes

Updates

DuaelFr’s picture

Great minds think alike !

I was thinking to make something like you did but more like <firstchild:random-string>.
I think this might be done automatically to allow administrators to set it and forget it. The random string could be automatically generated when menu item form is submitted and just cleaned when shown in the field.

In favor of this feature I will add that this will unlock a lot of issues related to breadcrumbs.

+1 RTBC for me for this issue

DuaelFr’s picture

Issue summary: View changes

Updated issue summary.

Chris Matthews’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Assigned: Pol » Unassigned
Priority: Major » Normal
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The 7 year old patch still applies cleanly to the latest 7.x-1.x dev snapshot and works great for me so changing the status to RTBC. Unfortunately, the last stable release was in November 2011 so not sure when this will be included.

Checking patch menu_firstchild.module...
Hunk #4 succeeded at 67 (offset 1 line).
Hunk #5 succeeded at 90 (offset 1 line).
Hunk #6 succeeded at 107 (offset 1 line).
Applied patch menu_firstchild.module cleanly.