4

I have a view with an attached view to display the first row with different fields and markup. This works perfectly except for when you start using the pagination.

When I press another page (in the pagination) to load the next group of rows, I don't want either the attached view nor the pager offset.

I've seen some solutions which rely on showing rendered nodes with a different view mode for the first row. I would very much like to find a solution which is compatible with fields instead.

My main problem is that when you've started going through the pages, the first row is always skipped. Even though that is the expected behaviour, it's not how I want it to be.


Here's the pager settings for the default display and the attachment display.

Pager settings

Default display: Default display pager settings

Attachment display: Attachment display pager settings


The rendered view

Here's how the rows are rendered on the first and the second page. The blue box represents all rows (in my case only 1) from the attachment display and the red boxes represents the rows from the default display. The number in the boxes is the row id.

Please note how row 9 is never shown.

First page: First page of the rendered view

Second page: Second page of the rendered view

1 Answer 1

1

There is a workaround described here: https://drupal.org/comment/4109006#comment-4109006. It is for D6 but as far as I can tell it should work in D7 too. The approach seems a little odd and I didn't try it out on my own, but it might solve your problem.

4
  • Thanks! I'll try it during the day and get back to you with the results.
    – hampusn
    Nov 27, 2013 at 8:15
  • Did you succeed?
    – berliner
    Nov 29, 2013 at 16:28
  • Sorry, didn't get the time for it. Other projects had higher priority. I'll make sure to give it a try tomorrow (monday).
    – hampusn
    Dec 1, 2013 at 10:58
  • The solution was regrettably not viable for our specific case. And I'm not really that happy about using a module without any stable release (drupal.org/project/views_php). We'll have to find another way altogether.
    – hampusn
    Dec 3, 2013 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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