I am using QuickTabs to display, by year, a field-collection of a PDF and a Date. But I can't figure out how to send the argument from the QT to the contextual filter in the view because it is a block, not a page, so I don't have the arguments being submitted in the path to grab.
Here is my view without the contextual date filter, showing all the content (it is already being filtered by NID and type):
Here is a working, fixed-value contextual date filter:
This successfully filters the date to only 2017 items:
So, it is working with a fixed value. Now, trying to get it to use the argument from my QuickTabs is what isn't working. Here is my QuickTab (with the fixed contextual filter removed):
Here is what outputs on the tab WITHOUT the argument:
And here's the output on a tab with the argument (not working because there's no contextual filter anymore):
Seeings as how this isn't a block, I can't use the path arguments to the contextual filters. QuickTabs says "Additional arguments to send to the view as if they were part of the URL in the form of arg1/arg2/arg3. You may use %0, %1, ..., %N to grab arguments from the URL." I'm not totally sure how to use these but I tried using %0 as a fixed-value in the contextual filter. I've tried setting the argument in my quicktab to be "%0/%1/2017-01-01--2017-12-31". I've tried extensively using "Raw Value from URL" but no avail.
I've got all the modules enabled that I need to make this happen (i.e. date-views so that it accepts a range). So I'm sure it's just some very specific set of configuration and argument syntax that I just haven't guessed correctly yet.
Anyone able to help me with this issue has my sincerest thanks!!! Following is the view export:
$view = new view();
$view->name = 'resource_view';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Resource View';
$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'] = 'Resource View';
$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'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '20';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Relationship: Content: Resource (field_resource) */
$handler->display->display_options['relationships']['field_resource_value']['id'] = 'field_resource_value';
$handler->display->display_options['relationships']['field_resource_value']['table'] = 'field_data_field_resource';
$handler->display->display_options['relationships']['field_resource_value']['field'] = 'field_resource_value';
$handler->display->display_options['relationships']['field_resource_value']['delta'] = '-1';
/* Field: Field collection item: Resource Date */
$handler->display->display_options['fields']['field_resource_date']['id'] = 'field_resource_date';
$handler->display->display_options['fields']['field_resource_date']['table'] = 'field_data_field_resource_date';
$handler->display->display_options['fields']['field_resource_date']['field'] = 'field_resource_date';
$handler->display->display_options['fields']['field_resource_date']['relationship'] = 'field_resource_value';
$handler->display->display_options['fields']['field_resource_date']['label'] = '';
$handler->display->display_options['fields']['field_resource_date']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_resource_date']['settings'] = array(
'format_type' => 'month_only',
'fromto' => 'both',
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'show_remaining_days' => 0,
'addtocalendar_show' => 0,
'addtocalendar_settings' => array(
'style' => 'blue',
'display_text' => 'Add to Calender',
'atc_title' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_description' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_location' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_organizer' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_organizer_email' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_date_end' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_privacy' => 'public',
'data_secure' => 'auto',
'data_calendars' => array(
'iCalendar' => 0,
'Google Calendar' => 0,
'Outlook' => 0,
'Outlook Online' => 0,
'Yahoo! Calendar' => 0,
),
),
);
/* Field: Field collection item: Resource File */
$handler->display->display_options['fields']['field_resource_file']['id'] = 'field_resource_file';
$handler->display->display_options['fields']['field_resource_file']['table'] = 'field_data_field_resource_file';
$handler->display->display_options['fields']['field_resource_file']['field'] = 'field_resource_file';
$handler->display->display_options['fields']['field_resource_file']['relationship'] = 'field_resource_value';
$handler->display->display_options['fields']['field_resource_file']['label'] = '';
$handler->display->display_options['fields']['field_resource_file']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['field_resource_file']['alter']['text'] = 'Download to View';
$handler->display->display_options['fields']['field_resource_file']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['field_resource_file']['alter']['path'] = '[field_resource_file]';
$handler->display->display_options['fields']['field_resource_file']['alter']['absolute'] = TRUE;
$handler->display->display_options['fields']['field_resource_file']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_resource_file']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_resource_file']['type'] = 'file_url_plain';
/* 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'] = 'fixed';
$handler->display->display_options['arguments']['nid']['default_argument_options']['argument'] = '6783';
$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;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'resource_page' => 'resource_page',
);
/* Display: View: Pedestrian Resources */
$handler = $view->new_display('block', 'View: Pedestrian Resources', 'block');
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Field collection item: Resource Date */
$handler->display->display_options['fields']['field_resource_date_1']['id'] = 'field_resource_date_1';
$handler->display->display_options['fields']['field_resource_date_1']['table'] = 'field_data_field_resource_date';
$handler->display->display_options['fields']['field_resource_date_1']['field'] = 'field_resource_date';
$handler->display->display_options['fields']['field_resource_date_1']['relationship'] = 'field_resource_value';
$handler->display->display_options['fields']['field_resource_date_1']['settings'] = array(
'format_type' => 'date_only_full',
'fromto' => 'both',
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'show_remaining_days' => 0,
'addtocalendar_show' => 0,
'addtocalendar_settings' => array(
'style' => 'blue',
'display_text' => 'Add to Calender',
'atc_title' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_description' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_location' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_organizer' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_organizer_email' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_date_end' => array(
'field' => 'token',
'tokenized' => '',
),
'atc_privacy' => 'public',
'data_secure' => 'auto',
'data_calendars' => array(
'iCalendar' => 0,
'Google Calendar' => 0,
'Outlook' => 0,
'Outlook Online' => 0,
'Yahoo! Calendar' => 0,
),
),
);
/* Field: Field collection item: Resource File */
$handler->display->display_options['fields']['field_resource_file']['id'] = 'field_resource_file';
$handler->display->display_options['fields']['field_resource_file']['table'] = 'field_data_field_resource_file';
$handler->display->display_options['fields']['field_resource_file']['field'] = 'field_resource_file';
$handler->display->display_options['fields']['field_resource_file']['relationship'] = 'field_resource_value';
$handler->display->display_options['fields']['field_resource_file']['label'] = '';
$handler->display->display_options['fields']['field_resource_file']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['field_resource_file']['alter']['text'] = 'Download to View';
$handler->display->display_options['fields']['field_resource_file']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['field_resource_file']['alter']['path'] = '[field_resource_file]';
$handler->display->display_options['fields']['field_resource_file']['alter']['absolute'] = TRUE;
$handler->display->display_options['fields']['field_resource_file']['alter']['target'] = '_blank';
$handler->display->display_options['fields']['field_resource_file']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_resource_file']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_resource_file']['type'] = 'file_url_plain';
$handler->display->display_options['defaults']['arguments'] = FALSE;
/* 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'] = 'fixed';
$handler->display->display_options['arguments']['nid']['default_argument_options']['argument'] = '6781';
$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';
$handler->display->display_options['block_description'] = 'View: Pedestrian Resource View';
/* Display: View: Monthly Indicator Resources */
$handler = $view->new_display('block', 'View: Monthly Indicator Resources', 'block_1');
$handler->display->display_options['defaults']['arguments'] = FALSE;
/* 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'] = 'fixed';
$handler->display->display_options['arguments']['nid']['default_argument_options']['argument'] = '6783';
$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';
$handler->display->display_options['block_description'] = 'View: Monthly Indicator Resource View';
////////////////////
UPDATE IN RESPONSE TO Stefanos-Petrakis
////////////////////
I've tried it your way but the contextual filter just filters everything out.
Here's the field settings:
As you can see, it takes out everything...
The date field takes Year and Month only, not that it should matter. Other than that, it is a normal date field. Definitely have dates in 2016, as well.
I'd be happy to provide any other screenshots that may be helpful. Thank you so much.
/////////////////////