When summary view is created, it probably will display links (or a jump menu)

This links are using as base path the first path founded in displays. I'm attaching a view export that just include a summary view. If you hit in "preview" all items are linking to "/"

This occurs because there is no page displays to get the path. This is a problem also when there is multiple displays with different paths. Users needs to create multiple views to get multiple summary views pointing to the right path.

As use case, let say an user want two summary views, one by tags (count) and other by month.

They will want to see something like

drupal (12)
joomla! (2)
wordpress (3)

and

june (3)
july (10)
august (4)

But the links will point to my_path/argument_value (if my_path exists as the path of one of the display of this view)

I'm attaching a patch to allow to define the base path for the links that are generated by summary views.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

+++ plugins/views_plugin_style_summary_jump_menu.inc	2 Jul 2010 17:43:31 -0000
@@ -61,7 +72,10 @@ class views_plugin_style_summary_jump_me
+      $path = url($this->view->get_url($args, $base_path), $url_options);

base_path is not always defined here. I think we should set the default value of get_url first :)

+++ theme/theme.inc	2 Jul 2010 17:43:33 -0000
@@ -234,7 +234,10 @@ function template_preprocess_views_view_
+    $vars['rows'][$id]->url = url($view->get_url($args, $base_path), $url_options);

same as above

+++ theme/theme.inc	2 Jul 2010 17:43:33 -0000
@@ -267,7 +270,10 @@ function template_preprocess_views_view_
+    $vars['rows'][$id]->url = url($view->get_url($args, $base_path), $url_options);

too

Powered by Dreditor.

The rest looks fine. Here is a new patch

dagmar’s picture

Status: Needs review » Reviewed & tested by the community

Ok, it is working fine, thanks dereine.

It is a very simple patch, lets change the status.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all branches. Great feature, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Gauravk’s picture

Hi There,

I am facing this same problem that from contextual filter in jump menu, its linking to homepage instead of link displayed.

I am newbie to drupal and don't know how to fix this issue with the patch. Can you please point me in right direction by advising if i still need to patch something (and how) with drupal 7.23 and views 7.x-3.6. Thanks.

dagmar’s picture

FileSize
48.04 KB

@Gauravk this was included three years ago.

Sumary links

Gauravk’s picture

Thanks dagmar, what should i mention in base path to open original link content than the homepage?

Secondly i want the jump menu not list, as this is pointing to additional piece of content on similar nodes.