
[英]how to display content above the MENU_LOCAL_TASK tabs in drupal
[英]Drupal 6: how to display node with its local tasks tabs in menu item
就我而言,每个用户都有一个画廊。 图库是一个节点。 我想隐藏默认的“创建内容”菜单,并添加链接到用户图库的自定义菜单链接。
function custom_menu() {
$items = array();
$items['galleries/editgallery'] = array(
'title' => 'Edit gallery',
'description' => 'edit gallery',
'page callback' => 'custom_edit_gallery',
'access callback' => 'custom_access_editgallery',
);
return $items;
}
function custom_edit_gallery (){
global $user;
$node = node_load ($user->gallerynid);
return node_page_view ($node);
}
但是它不显示本地任务选项卡(如“编辑”选项卡)。
您需要自己添加它们。
hook_menu
使用MENU_LOCAL_TASK
和MENU_DEFAULT_LOCAL_TASK
,请参阅api 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.