Problem/Motivation
As documented in #2761373-3: Integrate with Views Infinite Scroll 7.x-2.x the views header does not seem to be supported. Follow 1st 5 steps in that linked issue to reproduce, namely:
- On a fresh install, generate a load of content and enable views_infinite_scroll (2.x).
- Create a simple view of content (50 items, paged at 10) and infinite scroll. Add some text to the view header.
- Infinite scroll works as expected.
- Make another view to act as the "filter". Simple html-list of taxonomy terms. Add this to the header of the content view.
- Content view now breaks. As I scroll down the page, I get the view header duplicated with each new block of content that is loaded. Also, each time the whole result is appended. So On the first scroll, twenty items (with header) are appended, on the next scroll thrity are appended, etc.
This seems to be due to method differences between 1.x and 2.x as alluded to in this support request: #2761547: Why does 1.x append rows and 2.x replace the whole view?.
Proposed resolution
Append new row data only, rather than entire view.
Remaining tasks
As above.
User interface changes
API changes
Unknown
Data model changes
Unknown
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views_header_is-2764125-2.patch | 700 bytes | saurabh.dhariwal |
| #2 | before_applied_patch.png | 63.17 KB | saurabh.dhariwal |
| #2 | after_applied_patch.png | 47.28 KB | saurabh.dhariwal |
Comments
Comment #2
saurabh.dhariwal commentedPlease find the attached patch "views_header_is-2764125-2" which works fine as per your requirements.
Let me know if any query/concern for the same.
Comment #3
saurabh.dhariwal commentedComment #4
mccrodp commentedThat's great @saurabh.dhariwal. Thank you. Hope to test this soon. (I think you assign while working on it and set to unassigned when it needs review, etc.?)
Comment #5
saurabh.dhariwal commentedSounds good! Would be awaiting for your inputs. Keep me updated once this is tested.
Thanks!
Comment #6
Robert_T commentedSee also the patch at https://www.drupal.org/node/2736419. That patch solved this same problem for me.