开发者

Can I combine Views page tabs with module generated tabs?

I have created a View with multiple page displays. I have specified one as the "default tab" and the other two as "tab" and they all display c开发者_如何学Pythonorrectly together on a page similar to this:

Can I combine Views page tabs with module generated tabs?

I would like to be able to insert another tab onto this page with module generated code (not from a view). Is this possible?


Using the menu hook you can define another tab for the page similar to below:

function MODULENAME_menu() {
  $items = array();

  $items['PATH_TO_VIEW_DEFAULT_TAB/YOUR_NEW_TAB'] = array(
    'title' => 'TAB TITLE',
    'page callback' => 'FUNCTION NAME',
    'page arguments' => array('ACCESS ARGUMENT'),
    'access callback' => 'user_access',
    'access arguments' => array('ACCESS ARGUMENT'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10
  );
  return $items;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜