1

I'm using the standard views implementation of taxonomy term pages, ok I've added a view header display, but beyond that, it's a stock Views 3 view.

It apparently has a pager set, but it's not showing up. Once upon a time it was there, now it's not. It was my client that noticed *blush*. Yes there are enough results in the query. Have tried Mini and Full versions, but nothing seems to create any HTML that resembles a pager.

It seemed to happen after adding another simple view in the header.

  • 1
    Are there any other pagers on the same page the view is on? – Clive May 22 '12 at 21:12
  • great clue! Got it. The attachment I'd added (which only shows the term description) was wrongly set to have a pager, even though it will only ever have one item to display. So there was no pager, but obviously enough of one to upset the main pager. I found that by removing the pager from the attachment, it works. I also found that by using 1 instead of 0 for the pager Id, this works too. Thank you. Don't suppose you know how to get the pager to display at the top as well as the bottom? – artfulrobot May 22 '12 at 21:50
  • 2
    Yeah, you need to override the template file for the view and print the pager twice...there's a page on drupal.org with an example – Clive May 22 '12 at 21:55
  • Thanks, really useful! If you care about points (I see you have about a billion, so maybe not) and want to move these comments into an answer, I'll tick it. – artfulrobot May 22 '12 at 21:57
  • Nah that's cool, but you might want to answer it yourself...the fact that when you add an attachment it automatically inherits the pager, and can cause this problem, might be helpful to someone else :) – Clive May 22 '12 at 22:05
2

To save you wading through the comments which led to this answer, here it is in summary:

The problem was that the 2nd view included in the Header of the main view also had a pager on it.

Two solutions:

  1. Views can cope with having more than one pager, with a bit extra config: you have to set the Pager Id field on one of the Views Displays to an integer not in use by other views/displays on that page (e.g. 1 instead of 0).

  2. In my case I realised that the attached header view did not actually need a pager (it was only ever going to display one result - the description for the taxonomy term), and I should have selected "show fixed number of results" instead of a pager option. Changing this fixed the problem.

Hope this answer is useful for someone else getting stuck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.