From 75ca5d40c6805ab611827c0f72147902e043d11d Mon Sep 17 00:00:00 2001 From: Cynthia Mijares Date: Tue, 16 Sep 2014 16:52:07 -0700 Subject: [PATCH] BASIC-826 | images link to content in news views --- .../stanford_news_views.info | 2 +- .../stanford_news_views.views_default.inc | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/stanford_news_views/stanford_news_views.info b/modules/stanford_news_views/stanford_news_views.info index 544dd67..64e4f1d 100644 --- a/modules/stanford_news_views/stanford_news_views.info +++ b/modules/stanford_news_views/stanford_news_views.info @@ -2,7 +2,7 @@ name = Stanford News Views description = Views for the stanford_news module and content type. core = 7.x package = Stanford -version = 7.x-1.0-alpha3 +version = 7.x-1.0-alpha5 project = stanford_news_views dependencies[] = ctools dependencies[] = date diff --git a/modules/stanford_news_views/stanford_news_views.views_default.inc b/modules/stanford_news_views/stanford_news_views.views_default.inc index f6eefb0..f3fe3c3 100644 --- a/modules/stanford_news_views/stanford_news_views.views_default.inc +++ b/modules/stanford_news_views/stanford_news_views.views_default.inc @@ -487,12 +487,19 @@ function stanford_news_views_views_default_views() { $handler->display->display_options['empty']['area']['empty'] = TRUE; $handler->display->display_options['empty']['area']['content'] = 'No news items listed.'; $handler->display->display_options['empty']['area']['format'] = 'content_editor_text_format'; + /* Field: Content: Nid */ + $handler->display->display_options['fields']['nid']['id'] = 'nid'; + $handler->display->display_options['fields']['nid']['table'] = 'node'; + $handler->display->display_options['fields']['nid']['field'] = 'nid'; + $handler->display->display_options['fields']['nid']['exclude'] = TRUE; /* Field: Field: Image */ $handler->display->display_options['fields']['field_s_image_info']['id'] = 'field_s_image_info'; $handler->display->display_options['fields']['field_s_image_info']['table'] = 'field_data_field_s_image_info'; $handler->display->display_options['fields']['field_s_image_info']['field'] = 'field_s_image_info'; $handler->display->display_options['fields']['field_s_image_info']['label'] = ''; $handler->display->display_options['fields']['field_s_image_info']['exclude'] = TRUE; + $handler->display->display_options['fields']['field_s_image_info']['alter']['make_link'] = TRUE; + $handler->display->display_options['fields']['field_s_image_info']['alter']['path'] = 'node/[nid]'; $handler->display->display_options['fields']['field_s_image_info']['element_label_colon'] = FALSE; $handler->display->display_options['fields']['field_s_image_info']['settings'] = array( 'edit' => '', @@ -833,6 +840,11 @@ function stanford_news_views_views_default_views() { $handler->display->display_options['pager']['options']['offset'] = '0'; $handler->display->display_options['pager']['options']['id'] = '0'; $handler->display->display_options['defaults']['fields'] = FALSE; + /* Field: Content: Nid */ + $handler->display->display_options['fields']['nid']['id'] = 'nid'; + $handler->display->display_options['fields']['nid']['table'] = 'node'; + $handler->display->display_options['fields']['nid']['field'] = 'nid'; + $handler->display->display_options['fields']['nid']['exclude'] = TRUE; /* Field: Field: Image */ $handler->display->display_options['fields']['field_s_image_info']['id'] = 'field_s_image_info'; $handler->display->display_options['fields']['field_s_image_info']['table'] = 'field_data_field_s_image_info'; @@ -1065,6 +1077,11 @@ function stanford_news_views_views_default_views() { $handler->display->display_options['pager']['options']['offset'] = '0'; $handler->display->display_options['defaults']['empty'] = FALSE; $handler->display->display_options['defaults']['fields'] = FALSE; + /* Field: Content: Nid */ + $handler->display->display_options['fields']['nid']['id'] = 'nid'; + $handler->display->display_options['fields']['nid']['table'] = 'node'; + $handler->display->display_options['fields']['nid']['field'] = 'nid'; + $handler->display->display_options['fields']['nid']['exclude'] = TRUE; /* Field: Field: Image */ $handler->display->display_options['fields']['field_s_image_info']['id'] = 'field_s_image_info'; $handler->display->display_options['fields']['field_s_image_info']['table'] = 'field_data_field_s_image_info';