User tests: Successful: Unsuccessful:
Pull Request for Issue #26881
limitstart
param to the action on pagination linkslimitstart
param is appended & modified while paginating.limitstart
is modified in address bar.NIL
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
Title |
|
Please revert coding style changes per Joomla! Coding Standards.
Okay sure, Can you let me know how to populate the pages that use pagination? Because I don’t seem to have enough data to paginate.
Try installing Testing Sample Data
. Then do a search on the frontend.
Labels |
Added:
?
|
I have tested this item
When going to i.e. page 2 (on pagination link) I get error 404.
@ChristineWk Can you please check now ?
I have tested this item
Error 404 has gone. On 2nd page > in address bar I see: blog?limitstart=5
I agree that the initial issue is a bug, but I don't understand why the method from J3 isn't still used. Can someone please explain why we should do it this way?
I am sorry to say, but the fix are wrong, such JavaScript hacking not acceptable
I am sorry to say, but the fix are wrong, such JavaScript hacking not acceptable
Since the pagination itself is done via Javascript, I couldn’t think of any other way to update the URL with the limitstart value. Could you suggest a better idea?
I agree that the initial issue is a bug, but I don't understand why the method from J3 isn't still used. Can someone please explain why we should do it this way?
Can you please let me know how it was done in J3 ? I’m new to Joomla! and I checked the branches here, and everywhere it’s done in JavaScript only.
In J3 frontend template had an override without JS in it.
Maybe in 4.0 we could do the other way around, make it JS-free by default and add an override for backend template instead.
I guess then the complete pagination code has to change if it has to be no-JS. All I’ve done is append the limitstart
param to the form action, added to the already existing JS code that modifies the hidden limitstart
field in the form and triggers it. As far as this issue is concerned, the task was to make different URLs render different content.
You put all your "multi-line" javascript code in to oneclick attribute, do not do this ever.
Also please check how the form
element works, you no need javascript to append a value that already there (use appropriate submit method GET/POST)
About correct fix, the pagination need to be a list of links, for frontend.
That @SharkyKZ already said
Pagination should be a list of links, without javascript, without form.
Templates support layout overrides. You can copy layouts/joomla/pagination/link.php
to templates/cassiopeia/html/layouts/joomla/pagination/link.php
to create an override for frontend template and remove JS code there.
Or the other way around, copy the file as-is to backend template: administrator/templates/atum/html/layouts/joomla/pagination/link.php
and then edit original file to remove JS code.
There are other alternatives to consider like creating multiple standard layouts and making them configurable in pagination calls.
Category | Layout | ⇒ | Layout Front End Templates (site) |
Now it looks much better than first version of it
Left only a testing, I guess.
I am coming to this late but to me it is crazy that we need to create an override. If we can't make the core work with the default templates that it ships with there is something very wrong
I am coming to this late but to me it is crazy that we need to create an override. If we can't make the core work with the default templates that it ships with there is something very wrong
Alright then, does having the start param in URL on administrator routes cause any issue? If not, I don’t think this override is required. I can edit the original link.php, but as I was told in this thread that only frontend needs to have that param in the URL, override was the only possible way
Why does it have to be the same layout for both site and admin?
I didn’t get you @brianteeman :(
@brianteeman there was comment @SharkyKZ suggested to make "this" as default, and then make override for admin template (should be simple), or make them configurable in pagination calls to use different layout depend from needs (this more advanced topic).
Admin use different pagination to keep adminForm "state". The form has extra fields, like CSR token, option, view etc, and can have more depend from component. As far as I know.
My view is that it should be
or make them configurable in pagination calls to use different layout depend from needs
It is good as it is for now, it fixes the issue.
What was suggested is much complex work to do, and can be done any time later.
I think we have a different look on what is "configurable pagination"
With your suggestion it still not possible to use simple links in backend, or javascript version on front end. It hardly can call "configurable".
The Pagination class allow to specify the layout, that allow to have 2 (an more) different layout at same time
joomla-cms/libraries/src/Pagination/Pagination.php
Lines 436 to 442 in 4779815
A complexity here is to check all call of $pagination->getPaginationLinks()
(both admin/site side) and adjust it to use specific layout, and make sure all works.
I think we have a different look on what is "configurable pagination"
?
Maybe so but my PR resolves the issue in the original report without creating template overrides
yeap, that also ok, I don't mind
as i said before
I am coming to this late but to me it is crazy that we need to create an override. If we can't make the core work with the default templates that it ships with there is something very wrong
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-01-14 14:51:05 |
Closed_By | ⇒ | rajkumaar23 |
Please revert coding style changes per Joomla! Coding Standards.