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
Comment #1
dawehnerIf this is a issue with contemplate it should be better filled against contemplate
Comment #2
suedehead commentedI 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.
Comment #3
melchoir55 commentedAre 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.
Comment #4
suedehead commentedYup, I'm absolutely sure. It doesn't matter if I have 1 item in there, even -- the pages will still show up..
Comment #5
merlinofchaos commentedAre you also displaying comments?
Comment #6
suedehead commentedNope, 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.