plugins/views_plugin_display_page.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/plugins/views_plugin_display_page.inc b/plugins/views_plugin_display_page.inc index 7a41fe6..c5b8082 100644 --- a/plugins/views_plugin_display_page.inc +++ b/plugins/views_plugin_display_page.inc @@ -153,7 +153,7 @@ class views_plugin_display_page extends views_plugin_display { // Add context for contextual links. // @see menu_contextual_links() if (!empty($menu['context'])) { - $items[$path]['context'] = MENU_CONTEXT_INLINE; + $items[$path]['context'] = (empty($menu['contextpage']) && MENU_CONTEXT_PAGE) | MENU_CONTEXT_INLINE; } // If this is a 'default' tab, check to see if we have to create teh @@ -383,12 +383,23 @@ class views_plugin_display_page extends views_plugin_display { ); $form['menu']['context'] = array( '#title' => t('Context'), - '#suffix' => '', '#type' => 'checkbox', '#default_value' => !empty($menu['context']), '#description' => t('Displays the link in contextual links'), '#dependency' => array('radio:menu[type]' => array('tab')), ); + $form['menu']['contextpage'] = array( + '#title' => t('Hide menu tab'), + '#suffix' => '', + '#type' => 'checkbox', + '#default_value' => !empty($menu['contextpage']), + '#description' => t('Only display menu item entry in contextual links. Menu tab should not be displayed.'), + '#dependency' => array( + 'radio:menu[type]' => array('tab'), + 'edit-menu-context' => array(1), + ), + '#dependency_count' => 2, + ); break; case 'tab_options': $form['#title'] .= t('Default tab options');