【发布时间】:2011-02-03 21:20:04
【问题描述】:
在我的例子中,每个用户都有一个画廊。图库是一个节点。我想隐藏默认的“创建内容”菜单并添加链接到用户库的自定义菜单链接。
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);
}
但它不显示本地任务选项卡(如“编辑”选项卡)。
【问题讨论】: