Hi there,
I'd like to to navigate the blog.module with tabs.
At first it seemed really easy to me to add tabs to the hook_menu function of the blog.module
I thought I'd only have to add the String " 'type' => MENU_LOCAL_TASK " to the function blog_menu, as done in the following code below, and I'd get a tab at the top of the page.
function blog_menu($may_cache) {
global $user;
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/blog',
'title' => t('blog entry'),
'access' => user_access('edit own blog')),
'type' => MENU_LOCAL_TASK;
$items[] = array('path' => 'blog', 'title' =>
t('blogs'),
'callback' => 'blog_page',
'access' => user_access('access content'),
'type' => MENU_SUGGESTED_ITEM);
}
return $items;
}
But I was wrong!
I`ve seen some Threads in this forum, but I can't really work them out.
Then I thought to create an tabblog.module on my own:
?php
function mytabsblog_menu($may_cache)
{
$items = array();
if (!$may_cache) {
if (arg(0) == 'blog' && is_numeric(arg(1))) {
$items[] = array(
'path' => 'blog/'. arg(1) .'/',
'callback' => 'mytabsblog_subfunction',
'title' => t('WebLogs'),
'access' => TRUE,
'type' => MENU_LOCAL_TASK
);
}