When creating nodes through profiler, you can set the node to appear in the menu. However, it's not possible to set the menu parent item, so all nodes with enabled menu links are flat and appear in the root level of the menu.

It would be really awesome to be able to specify something like:

nodes[foo][type] = page
nodes[foo][title] = Lorem ipsum
nodes[foo][menu][enabled] = 1
nodes[foo][menu][link_title] = Lorem ipsum
nodes[foo][menu][menu_name] = main-menu

nodes[bar][type] = page
nodes[bar][title] = Delor sit amet
nodes[bar][menu][enabled] = 1
nodes[bar][menu][link_title] = Delor sit amet
nodes[foo][menu][menu_name] = main-menu
nodes[foo][menu][parent] = bar

So in this case, your menu would be built out as

  • Lorem ipsum
    • Delor sit amet

Comments

jyee’s picture

Status: Active » Needs review
StatusFileSize
new927 bytes

Patch attached.

lotyrin’s picture

Status: Needs review » Reviewed & tested by the community
jhedstrom’s picture

Re-rolling #1.

jyee’s picture

Status: Reviewed & tested by the community » Fixed

Commited re-roll from #3

Status: Fixed » Closed (fixed)

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