Greetings,
Basically, I have a Content Type: Game which I want to add Tabs (along-side View and Edit) to the node such as; Servers, Ladder, Tournaments, Media and Downloads.
I used the instructions in the following article, but my Tab is not showing up! o_Oa?
http://www.interworks.com/blogs/samaral/2011/12/16/how-add-tabs-drupal-p...
I've tried setting my 'Tab View' path settings to the parent URL alias and also the direct node/83
I have literally spent more than 3 hours trying to figure this out thinking it would be a 15 minute task. I've played with the settings trying to luckily get it to work but so far, no good ;[
I downloaded the QuickTabs Module but that seems to only create a 'Tabs Block' which would be useful for other portions of the site but not for what I am trying to accomplish right now.
Any help would be greatly appreciated! Thanks.
Comments
The key to what you are
The key to what you are trying to do (which is not in that tutorial) is...
In your view go to Contextual filters and add nid and select the option of "provide default value" and select content Id from URL.
in your path settings use node/%/tab-name
Blank View
Thanks nicoz for your response. =]
I executed said steps, however now node/83 is no longer displaying it's own content but is displaying a blank View. The configuration of the View's Page Settings Menu: is Default menu tab > menu tab
Ensure you are using
Ensure you are using node/%/tab-name not node/%
Also under "Menu" should set this to "Menu Tab" From there you will set your Tab's title, description and put it into Menu "Navigation".
In fact, looking back at that tutorial that you reference in your original post, it is missing several steps and is not really applicable to D7 either.
Ah, thank you for additional
Ah, thank you for additional assistance.
Just to confirm my View Settings are as follows
Path:/node/83/sexpservers
Menu: Tab: Servers (Menu Tab set to Navigation)
I went into the Game Content Type and edited the 'Menu settings' to reflect Navigation as an Available menu and also as a Default parent item.
Refreshed and now /?q=node/83/ is showing it's original content again, and my 'Tab' View at /?q=node/83/sexpservers is still blank. However, no tab on my node/83 page. ='[
I've got to think this is some sort of user error for a configuration setting. I've double and tripled checked the settings multiple times and still not sure what's wrong. I am also open to possible alternative solutions for adding tabs to nodes if there may be easier work-around or fix.
Thanks again nicoz
First off, you should really
First off, you should really enable clean URLs. Get rid of the ?q= in your URLs. See http://drupal.org/getting-started/clean-urls
Then, just import this view at add the fields you want. It should take care of it for you.
$view = new view();
$view->name = 'custom_tab';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Custom Tab';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'custom_tab';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Content: Nid */
$handler->display->display_options['arguments']['nid']['id'] = 'nid';
$handler->display->display_options['arguments']['nid']['table'] = 'node';
$handler->display->display_options['arguments']['nid']['field'] = 'nid';
$handler->display->display_options['arguments']['nid']['default_action'] = 'default';
$handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node';
$handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['path'] = 'node/%/custom-tab';
$handler->display->display_options['menu']['type'] = 'tab';
$handler->display->display_options['menu']['title'] = 'Custom Tab';
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['name'] = 'management';
$handler->display->display_options['menu']['context'] = 0;
$handler->display->display_options['tab_options']['title'] = 'Custom Tab';
$handler->display->display_options['tab_options']['weight'] = '0';
$handler->display->display_options['tab_options']['name'] = 'management';
THANK YOU!!
THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!
THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!
THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!
I enabled Clean URLs advised by your pro tip and Imported your special View and now my node page has the Custom Tab! I just need to customize it the way I need to.
Thank you so much for all of your help nicoz !! ^_________^