How to keep paging inside a quick tab

fumbling - April 21, 2009 - 22:22
Project:Quick Tabs
Version:6.x-2.0-rc3
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

I have two tabs, both of which are surfacing a view, and each of which have pagers at the bottom. The first tab-view-pager works fine, but the pager on the second tab simply links back to the corresponding page of the first tab, as if I'd clicked on its pager instead. I've tried turning on and off the AJAX option for quicktabs, as well as trying a block instead of a page or default view for the second tab, but not having any luck. I imagine it's something simple I've overlooked. Any ideas?

#1

Pasqualle - April 22, 2009 - 00:18

you need to use ajax views, if you need pagination, sort, or filter view functionality inside quicktabs. Non-ajax view makes a full page reload.

edit view->Basic settings->Use AJAX

#2

fumbling - April 22, 2009 - 08:11

Thanks, you're right, that did it.

#3

Pasqualle - April 22, 2009 - 10:27
Status:active» fixed

#4

najibx - April 25, 2009 - 02:46

thanks, i was using an iframe earlier. I thought that "use Ajax" is only for pagination. now I know ...

#5

System Message - May 9, 2009 - 02:50
Status:fixed» closed

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

#6

alesuz - June 25, 2009 - 18:00

I don't have pager in my page but I have exposed filters. When I use the filter in the second tab it links back to the corresponding page of the first tab. And it happens even using Ajax. What should I do?

#7

Pasqualle - June 25, 2009 - 19:35
Status:closed» active

It should not happen when you are using ajax view.

edit view->Basic settings->Use AJAX

#8

tauno - June 29, 2009 - 04:05

I'm seeing a similar issue. I have a programatically created quicktabs block that has an ajax enabled view (block display) as the first tab. The exposed filter form isn't using ajax like it should and is submitting to the site home page (with the filter arguments in the url). If I add a page display to the view it submits to that page. I'm using 6.x-2.x-dev.

#9

Pasqualle - June 29, 2009 - 04:54

can you attach a screenshot of the view and quicktab settings?

#10

tauno - June 30, 2009 - 03:33

Here's the code I'm using in my block to generate the quicktab block. This is used in a custom module, not php input to a user defined block. Attached is the screenshot of the view I'm trying to use. The exposed filters use ajax when I include the view as a normal block and in the views UI preview. Let me know if you have any ideas for tracking down the issue.

<?php
  $tabs
= array();
 
$tabs['booking'] = array(
   
'title' => t('Book this activity or trip'),
   
'type' => 'view',
   
//'bid' => 'views_delta_activities-block_1',
   
'vid' => 'activities',
   
'display' => 'block_1',
   
'hide_title' => TRUE,
  );

 
$tabs['intake'] = array(
   
'title' => t('Program request'),
   
'type' => 'block',
   
'bid' => 'formblock_delta_request', // 'bid' in quicktabs is in the format <module>_delta_<block delta>
   
'hide_title' => TRUE,
  );

 
$quicktabs['qtid'] = 'bookrequest';
 
$quicktabs['tabs'] = $tabs;
 
$quicktabs['style'] = 'nostyle';
 
$quicktabs['ajax'] = TRUE;
  return
theme('quicktabs', $quicktabs);
?>

AttachmentSize
admin_build_views_edit_activities.png 43.28 KB

#11

Pasqualle - June 30, 2009 - 05:14

ok, this looks good, and I do not see why it does not work.
As I see you first tried to insert the view as block tabpage, that would be wrong, that does not work. Here is the explanation if you want to know why view must be inserted as view: #345175-1: what could be inside ajax quicktabs

the only issue here is the view argument. You have an argument in the view but you are not passing it to the view.

#332895: render quicktab programatically This is the example how to insert a view into quicktab:

$tabs['first'] = array(
  'title' => t('One'),
  'type' => 'view',
  'vid' => 'my_view_id',
  'display' => 'my_display',
  'args' => 'my_arguments',
);

So, you should try to delete the argument from the view or pass the argument to the view in your code. And there is no 'hide_title' property for view type tabpage.

Other thing you should try to change

$quicktabs['ajax'] = FALSE;

That should always work without any problem, as it is almost same as the embed_view() function. Although the view is on the first tabpage so it has no effect on it (as the first tabpage is always loaded at page load normally without any ajax).

#12

tauno - July 1, 2009 - 02:21

Ah. I tried all your suggestions and then figured it out. Not QT related I don't think. I was using the same view display (block) in another place on the page while I was testing quicktabs, I guess views doesn't like that too much. Thanks for the suggestions though. I did remove the hide_title property and add an empty args property (my view uses a php generated arg though) for consistency. Since I hopped in on this issue I'll leave it as active for the previous poster.

#13

Pasqualle - July 18, 2009 - 03:46
Status:active» postponed (maintainer needs more info)

@alesuz: do you still have problems with the pager?

#14

alesuz - October 14, 2009 - 18:20

Yes I had. When I click the pager in the second tab, it returns to the first tab. I had to find another solution to solve this problem... http://www.neapa.org.br/estamosAqui

#15

Pasqualle - October 14, 2009 - 18:52

@alesuz: please read the first comment. It is not an ajax view on your site..

 
 

Drupal is a registered trademark of Dries Buytaert.