Hi,

I'm using clones of the "taxonomy/term" view to organize content on my site. Each page has a default display that lists blog entries tagged with a given term, and an attachment display with photos tagged by that term. Both displays use pagers. The default display displays 10 items at once, and the attachment display displays only 1 item.

The problem is that the pagers "sync" with each other - so when I page to the second set of 10 items in the default display, the attachment display also pages to the second item, and vice versa. I don't want this to happen. Is there a way to make the pagers operate separately?

I tried un-checking "Inherit pager" in the Attachment settings, and leaving "Render pager" checked, but this made the pager in the attachment disappear altogether.

Is there any way to "un-sync" the pagers while maintaining the ability to page in the attachment?

Here's an example of one of my pages:
http://www.hoodiecharlotte.com/category/neighborhood/charlotte/dilworth-...

THANKS!!

CommentFileSizeAuthor
#3 attachment.png78.52 KBdawehner
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dawehner’s picture

You need to override the pager settings on the attachment.

Then you choose a different pager id/element for the attachment display.

klistwa’s picture

Thank you! I'm not a programmer - is this something I can do in the interface?

dawehner’s picture

FileSize
78.52 KB

See this screenshot.

You can click override and change the settings for the attachment only.

klistwa’s picture

I think the values were already overridden since the #of items to display were already set to different numbers. The problem is, when I un-check "inherit pager" the pager disappears, and then I can't page through the items in the attachment. I would think that since "render pager" is still checked in the attachment settings that the pager would still show up. I'm not sure how to fix this. Thank you for your suggestion!

dawehner’s picture

To be able to use a indepedent pager please unselect "render pager", too.

fourmi4x’s picture

Hi, I have the same problem. (The thread http://drupal.org/node/1071984 is also about this issue).

I tried to unselect both "inherit pager" and "render pager", and all other combinations I could think of, but I don't manage to have an independent pager for the attachement view.

Either the pager is inherited and works well, or it is not inherited and it doesn't appear. Maybe it is because there is no Pager options in the "Items to display" configuration of attachement displays ?
(using views 6.x-3.x-dev)

arrubiu’s picture

I've the same problem, drupal 7 and views 3.
Because the result of the attach depends on the main displat, I should have this beaviour:
- when I change page of the main display, results of the attach should be reloaded
- when I change page of the attach, the main display have to not change..

ruuizz’s picture

Has anybody found a solution to this issue?

Murz’s picture

Have the same problem, need the separate pager for attachement.

ttapada’s picture

+1

sun-fire’s picture

The same.

bartclarkson’s picture

You may have to switch to approach with two different Blocks in the View and then both placed in a panel. A mini-panel will do it too.

That's what I did, anyway.

perisdr’s picture

Can't find a way to do it using Views. And can't find any info on the web. This is driving me crazy. If I select Inherit pager then all my attachments follow the same settings of the main display which I don't want, and if I choose not to Inherit then I cannot set a pager to an attachment. No workarounds for this one?

joshuautley’s picture

In D7 Views 3 attachments either inherit the page filter for that which they are attached or they do not have a pager. The solution for providing this functionality is to create a block and display the view (block) in the page footer (via the view page footer in views "Global: View area"). Use the context filter to specify the node id as the default value "Content ID from URL" then "Skip default for view URL" and "Specify validation criteria" that Display all results for the specified field.

(=

Let me know if you need more info.

This took me 2.5 hours to figure out. Would have taken less if I didn't try every possibility with the attachment view first. I have done something similar to this in D6 Views 3 but that solution used a block that was displayed on the pagename/* wildcard so the view was displayed using the block system not through views. It's a little clunky but works.

pozitive’s picture

+1

ShaneOnABike’s picture

Category: support » bug

+1 seems like a bug?

Geijutsuka’s picture

Drupal 7, Views 3:

To get this type of functionality, it's necessary to not make an attachment, but a block, as stated in #14. When you add the Global: View area to the main display's header or footer (or wherever), you have the option of inheriting the contextual filters of the main display—just as attachments can.

I had a fairly complex taxonomy view with a term argument and an attachment listing content labeled with the term. By just disabling this attachment (so as to save if needed) then making a block, and putting it in the footer of my term's page, I was able to put an independent, full pager on the block.

ladybug_3777’s picture

Issue summary: View changes

An even easier way is to simply provide a different pager ID for each display. If you click on the settings for the pager you'll find a section for Pager ID with this description:

Unless you're experiencing problems with pagers related to this view, you should leave this at 0. If using multiple pagers on one page you may need to set this number to a higher value so as not to conflict within the ?page= array. Large values will add a lot of commas to your URLs, so avoid if possible.

Simply leave one pager ID at 0, and set the other to 1. They will then work independently.

waqarit’s picture

By changing the "pager id" doesn't solve the issue. I have two displays of views. One display is inserted to 2nd display through "Global view area". I am using "views load more" in pager with ajax enabled. When I click to "load more" button, it replace the previous records instead of loading new. Anyone have solution for that???

knalstaaf’s picture

@joshuautley (and @Geijutsuka): this works to a certain extent indeed (thanks for that!), but when there's an exposed filter involved, like you would use in a view with a (Leaflet) map and a list of search results, you'll get the search form twice: one in the map, and one in a (separate) block.

First thing I'd think of is to manipulate the views block's tpl-file (using theme information), but when I comment out the code that prints the exposed filters, the whole view breaks when executing a search query. The same even happens when applying a display: none style on the second filter block as a whole, so it requires specific selectors within that block you'd assign that style to.

Would there be a more elegant way to avoid duplicate exposed filter blocks instead of hiding it with CSS?

joshuautley’s picture

That was going to be my suggestion. I can not think of another idea off the top of my head.

knalstaaf’s picture

Version: 6.x-2.12 » 7.x-3.0-beta2

Ok, CSS it is for now, thanks!

gr4phic3r’s picture

need also some help with this problem

i have a leaflet google roadmap view which should show ~1000 nodes and also some exposed filters, below is an attachment which shows the data in a table structure, but the attachment should show only 25 results per page. the problem is that i found no solution to seperate the pagers but still got a working exposed filtering
would be superhappy if anyone could tell me a solution for that

prafull.addweb’s picture

Issue tags: +views
Jigar.addweb’s picture

Issue tags: +pager
patbou02’s picture

I am experiencing the same issue in views with D8.

Any idea how to un-sync the pagers for each block within the same view?