I've got a View that loads a few nodes based on an argument. The row-style view is node, and so it outputs the teasers for each node. I've also set it to use a pager when the results number more than, say, 35.

The problem is that even when there are 10 results, for example, the full pager will show up at the bottom of the page. When I change the row-style view to 'fields view' and output the $nid as a field, the pager works properly (as in, isn't shown when there's less than 35 results). When I disable the content template for the teaser, then the pager also disappears and works properly. I can't, for the life of me, figure out why the contemplates themselves would be responsible for enabling/disabling the pager.

Can anyone shed light on this or replicate the issue?

Thanks!

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Content Templates (Contemplate)
Version: 6.x-2.11 » 6.x-1.x-dev
Component: page displays » Code

If this is a issue with contemplate it should be better filled against contemplate

suedehead’s picture

Project: Content Templates (Contemplate) » Views (for Drupal 7)
Version: 6.x-1.x-dev » 6.x-2.11

I don't think this is a contemplate issue -- I have a hard time imagining how contemplates would modify views behavior. I haven't looked into the code yet, but I'm assuming that views has a process where if views gets $X results, and $X is larger than $items-per-page, then views generates a pager.

Using contemplate or not, the query result from the db will still be $X -- so why does the page always appear only when contemplate is used? Contemplate only deals with the node templates, not the views theming or anything, so I'm assuming that the problem lies in Views.

melchoir55’s picture

Are you sure the "items per page" field in your default view settings is not set to 10? If it it set to 10 and you have "pager" set to "yes", then I imagine you'd get the behavior your describe.

suedehead’s picture

Yup, I'm absolutely sure. It doesn't matter if I have 1 item in there, even -- the pages will still show up..

merlinofchaos’s picture

Are you also displaying comments?

suedehead’s picture

Status: Active » Closed (cannot reproduce)

Nope, no comments (or links) being displayed! But I deleted the view, started anew, and everything seems to work. I have no idea why, and that bothers me, but I guess I'll close this for now.