Where is my Drupal View pager??

I created a view the other day, a simple view with one display, and change the Pager setting to Full. I had the view set for 50 records per page, and there were hundreds of records. When the first page loaded, there was no pager present.

And so began the head scratching.

I created a high level template (views-view--mypage.tpl.php) and dumped the $pager variable, preceded by *****. All I had on my output was *****. It would've been nice if I had a CSS display:none for the pager, but that's not the case.

So, what's the answer?

It's that field that I had always ignored in the pager dialog, Pager element.

The idea behind this field is that if you have more than one pager on the page, you need to change the index of the view pager so that it doesn't conflict. However, as I stated, this was a simple view. I did not have more than one display, so not more than one pager. And I had no other views on my screen. Why would there be another pager?


If comments are enabled for the nodes being viewed, for example, the comment mechanism provides a pager. I set the Pager element to 1, and voilà, the pager appeared.


by Dan (not verified) on Thu, 2012-04-19 17:41

You're awesome for posting this! Thanks so much. I had the same issue on Drupal 7 and dreaded futzing around for two days for an answer. You saved me a lot of time.

by britebyte (not verified) on Fri, 2012-06-15 08:43

Very nice tip but it doesn't solve the issue for me in this case. I am actually working through your book and I am on the alternate home page example. I have no pager despite enabling the mini pager and having enough content of the gallery type to  (generated by the devel module). I tried your tip, running cron to re-index, and clearing the cache. Any other thoughts on why the pager might be a no show?

Post new comment

©2005-2017 Ayen Designs. Underlying theme by Kiwi Themes.