I only have two blog articles...I cloned the default frontpage view, removing all displays and creating a block display. In the default, I set it to return fields (just linked title), set the pager to mini, and then in the items to display I set 5 with an offset of 1. It shows both articles. If I turn off the pager it shows just the second (correct behavior). The problem is the pagers do not respect the offset.

Comments

merlinofchaos’s picture

Unfortunately, there is no way to make Drupal's pager respect the offset. :/ I need to make that more clear in the text.

SolomonGifford’s picture

Component: Code » Documentation

Thanks for the quick reply.

simonaustin’s picture

Has anyone been able to address this issue? I'd even be okay with making changes to core if I really have to...

merlinofchaos’s picture

You would have to change the pager_query function in core to do this; such a change would have sweeping consequences, and I would heartily not recommend it.

simonaustin’s picture

I've had a quick look and this is no minor hack, even if I can accept that I'm breaking the upgrade path.

Bummer. Thanks for your help.

merlinofchaos’s picture

Title: Views offset with mini pager » Use alternate pager_query() so that offset can be used with apger.
Category: bug » feature

I just took a look at pager_query and it occurs to me that I can duplicate most of that code within Views and not actually call pager_query -- which would allow me to retain the offset.

I think this would be a valuable feature, so I will add this to the list.

merlinofchaos’s picture

Status: Active » Fixed

In fact, I went ahead and did this while i was thinking about it. The lack of offset with pager was a thorn in my side and an annoyance, and I'm glad to fix this.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.