Yet again I find myself using this great module on another site, and I noticed that the embedded views were not paginating. I modified the taxonomy_menu.inc function _taxonomy_menu_page to pass in the pagination parameters, and it worked great.

      // about line #285
      $output = views_build_view('embed',
        views_get_view(variable_get('taxonomy_menu_show_views_'. $vid, '')),
        $arguments, FALSE, NULL);

to

      $view = views_get_view(variable_get('taxonomy_menu_show_views_'. $vid, ''));
      $output = ($view) ? views_build_view('embed', $view, $arguments,$view->use_pager, $view->nodes_per_page) : '';

I haven't the time to test this with other view display types. This could lead to grief when using exposed filters or sorting in the table view type.

CommentFileSizeAuthor
#4 patch_taxonomy_menu.patch609 bytesjmlavarenne

Comments

gpantanetti’s picture

Thank you SO much! I've applied this patch to my taxonomy menu module and it works like a charm (I do not need to use exposed filters or table views at this moment).

alan d.’s picture

I forgot to set the view url, which would almost certainly mean that the exposed filters and sorting would break things. Thus the full code would be:

      // Embed the views output into the page
      $view = views_get_view(variable_get('taxonomy_menu_show_views_'. $vid, ''));
      if ($view) {
        // set $view->url to current page
        $view->url = $_GET['q'];
        $output = views_build_view('embed', $view, $arguments,$view->use_pager, $view->nodes_per_page);
      }
      else {
        $output = '';
      }
asak’s picture

I was going crazy.
So crazy.

THANK YOU so much!

It took me a while to figure out this problem is even related to taxonomy menu...

This works - please commit.

And thanks again...!

jmlavarenne’s picture

Status: Active » Needs review
StatusFileSize
new609 bytes

Thanks for this Alan D. - it's the solution to my problem.

I've written a patch with your modifications.

indytechcook’s picture

Assigned: Unassigned » indytechcook
Status: Needs review » Reviewed & tested by the community

I will review this along for commit.

marie_t’s picture

Thank you so much for this! I was going crazy trying to figure this out and this patch is exactly what I needed, works great. Thanks.

indytechcook’s picture

Status: Reviewed & tested by the community » Fixed

This is part of the latest DEV. Please test.

Status: Fixed » Closed (fixed)

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