我想要在test/form页面显示某个node的字段的表单,可是显示出来是错误的,见图片,代码如下,求帮看看要怎么改阿
function modal_entities_menu() {
$items = array();
$items['test/form'] = array(
'title' => 'Edit',
'page callback' => 'node_page_edit2',
'access callback' => 'node_access',
'access arguments' => array('update', 1),
'weight' => 0,
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
);
return $items;
}
function node_page_edit2() {
$node = node_load(3559);
print_r($node->type);
$type_name = node_type_get_name($node);
drupal_set_title(t('<em>Edit @type</em> @title', array('@type' => $type_name, '@title' => $node->title)), PASS_THROUGH);
$form=drupal_get_form($node->type . '_node_form', $node);
dpm($form);
return $form;