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
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
Thanks, you're right, that did it.
#3
#4
thanks, i was using an iframe earlier. I thought that "use Ajax" is only for pagination. now I know ...
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
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
It should not happen when you are using ajax view.
edit view->Basic settings->Use AJAX
#8
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
can you attach a screenshot of the view and quicktab settings?
#10
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);
?>
#11
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
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
@alesuz: do you still have problems with the pager?
#14
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
@alesuz: please read the first comment. It is not an ajax view on your site..