我希望您能帮助我,因为我不知道如何在Drupal7中调用hook_menu中的节点。
有可能吗?
$items['basketfacile/planning'] = array(
'type' => MENU_LOCAL_TASK,
'title' => 'Test',
'description' => "description",
'page callback' => 'drupal_get_form',
'page arguments' => array('basketfacile_plannings_form'),
'access arguments' => array('access content')
);这是我的菜单项,它调用一个表单,但是我想调用一个在我的Drupal安装中已经存在的节点表单。我们可以以文章为例。
你有主意吗?
发布于 2012-07-25 01:34:03
实际上,将节点嵌入到其他页面中非常容易,您可以这样做:
$items['menu/submenu'] = array(
'type' => MENU_LOCAL_TASK,
'title' => 'YOUR_TITLE',
'description' => "YOUR_DESCRIPTION",
'page callback' => 'node_add',
'page arguments' => array('YOUR_NODE_TYPE_NAME_MACHINE'),
'access callback' => 'node_access',
'access arguments' => array('create', 'YOUR_NODE_TYPE_NAME_MACHINE'),
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node')
);https://stackoverflow.com/questions/11635592
复制相似问题