drupal 7 views sub tabs not working

2019-08-01 05:19发布

问题:

hello i am experience a problem and need some help if possbile. i am using views 3 and i can make tabs normally on specific content types. what i want so is to have a sub tab under the existing tab on my content type. i am following the procedure as descibed on views to make another view and add tab as default menu tab i give a name and then i select already exists on the parent meny item select list. my sub menu not showing for this view . I then try to make a module to make this to show up but with no luck my module is as follows

<?php
/**
* Implements hook_menu().
*/
function myusersmenu_menu()  {
  $items = array();  
    $items['node/%node/entypa'] = array(
    'access callback' => 'myusersmenu_access_callback',
    'access arguments' => array(1),
    'title' => t('entypaapomodule'),
   'type' => MENU_LOCAL_ITEM,
  );
return items;
}
{
  $items = array();  
    $items['node/%node/entypa'] = array(
    'access callback' => 'myusersmenu_access_callback',
    'access arguments' => array(1),
    'title' => t('entypaapomodule'),
   'type' => MENU_LOCAL_TASK_DEFAULT,
  );
return items;
}
{
  $items = array();  
    $items['node/%node/entypa/forologia'] = array(
    'access callback' => 'myusersmenu_access_callback',
    'access arguments' => array(1),
    'title' => t('forologia'),
   'type' => MENU_LOCAL_TASK,
  );
return items;
}
function myusersmenu_access_check($node) {
  if ($node->type == 'users') {
    return TRUE;
  }
  return FALSE;
}

If anyone can tell me why drupal views sub tabs not working on the first place thats would be good. also if there is possibility to work with this menu somehow and solve the problem .. thank you bill.

标签: tabs drupal-7