Open reilldesign opened 6 months ago
I can confirm this. But its not a bug, its a feature ;-) Which of course can be changed...
Do you want to get rid of this remembering behavior in all list views in the frontend or only in the category view? Do we wanna keep the this remembering of the current page in the admin list views (images and categories)?
To change the behavior this line has to be added to the specific list model in the populateState() method after parent::populateState().
$this->setState('list.start', $app->getInput()->get('limitstart', 0, 'uint'));
As I haven't come across this feature before, I don't have a clear opinion. However, it is a hindrance for the infinite scroll display, as the pagination is not displayed and the visitor does not know where he is.
You have this feature in all core components in the backend.
I clearly see why it is not very practical in the category view. But what about the other list views? Do you want it there?
In the list views it is very practical for editing and sorting the images.
So then in a future PR the following line should be added to the frontend category model inside the populateState() method after parent::populateState() was called to reset the limitstart when reopening the category view.
$this->setState('list.start', $app->getInput()->get('limitstart', 0, 'uint'));
@Elfangor93 please create the corresponding pull request for the category view. I am unsure about the implementation.
When implementing the infinite scroll function, I noticed an error with the pagination. When reopening a category, not the first x images are loaded but the state of the previous pagination value. For example, 15 images with a display of 5 images per page result in three page links in the pagination 1 | 2 | 3. If I now navigate to page 2 and reopen the gallery, it starts with page 2 instead of page 1.