更新时间:2023-02-12 19:54:39
我觉得你在复杂的。在当我编程方式创建菜单项节点的过去,我刚才设置的MENU_NAME,LINK_TITLE和腰椎间盘突出症(父链接ID),即:
I think your over complicating it. In the past when I've programmatically created menu items for nodes, I just set the menu_name, link_title, and plid (parent link id), ie:
$menu['link_title'] = $t;
$menu['menu_name'] = 'primary-links';
$menu['plid'] = 867;
菜单模块在某些时候在通话过程中接管到node_save并没有休息为您服务。
The menu module takes over at some point during the call to node_save and does the rest for you.
〜马特