I create some nodes programmatically, this way:
foreach ($titles as $t) { $n = new stdClass(); $n->type = 'myType'; $n->uid = 1; $n->title = $t; $menu = array(); $menu['link_title'] = $t; $menu['menu_name'] = 'primary-links';
I have a menu structure like this:
primary-links Parent 1 Child 1 Child 2 Parent 2 Child 3
I want the new menu items to appear as child elements of Child 3. I managed to create the menu items at the same time as the nodes, and they appeared in the right menu, but not in the right place in the hierarchy. What am I missing?
source share