plugins/views_plugin_display_page.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/views_plugin_display_page.inc b/plugins/views_plugin_display_page.inc index 6ab95b7..f80c2da 100644 --- a/plugins/views_plugin_display_page.inc +++ b/plugins/views_plugin_display_page.inc @@ -30,6 +30,7 @@ class views_plugin_display_page extends views_plugin_display { 'weight' => array('default' => 0), 'name' => array('default' => variable_get('menu_default_node_menu', 'navigation')), 'context' => array('default' => ''), + 'contextpage' => array('default' => 0), ), ); $options['tab_options'] = array( @@ -153,7 +154,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 @@ -386,12 +387,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');