tpr Posted November 15, 2017 Posted November 15, 2017 Yes, as it takes the custom sort order into account, that you can set in the Children tab of the parent page. By default it falls back to"sort". 1
Macrura Posted November 17, 2017 Author Posted November 17, 2017 On 11/14/2017 at 11:39 PM, tpr said: Yes, as it takes the custom sort order into account, that you can set in the Children tab of the parent page. By default it falls back to"sort". @tprThe docs say: If your parent page(s) are not already sorting by a specific field, you may still tell the $pages->find() to sort by the parent's order by specifying "sort=sort" in your selector http://processwire.com/api/selectors/#sort so i would guess that all you need is sort=sort, and not the way you suggested (?)
tpr Posted November 17, 2017 Posted November 17, 2017 No, that tells that you always need to add sort=sort to ensure the admin sort order. I've used sort=sort in aos but noticed that custom sort order needs additional work. You can check it by adding a custom sort order to the parent page, and then see how the prev-next link targets are out of sync.
Macrura Posted November 18, 2017 Author Posted November 18, 2017 23 hours ago, tpr said: No, that tells that you always need to add sort=sort to ensure the admin sort order. I've used sort=sort in aos but noticed that custom sort order needs additional work. You can check it by adding a custom sort order to the parent page, and then see how the prev-next link targets are out of sync. ok thanks - gonna fix this next.
Macrura Posted March 27, 2020 Author Posted March 27, 2020 The module has been updated and now loads the prev/next links via ajax, which should hopefully solve any issues with the module potentially slowing down the page editor load. The work of finding the prev/next pages is handled by an ajax request after the editor is loaded. Been tested on all 3 admin themes, with link locations in breadcrumbs and in tabs. 1 1
Cybermano Posted January 27 Posted January 27 (edited) Hi @Macrura, thanks for this module. I have played a bit and found it useful, but at first time not very friendly. I try to explain... The Next/Prev links seems like to be in "loop" when at last/first items; I feel it quite unfriendly and not very helpful. When lot of siblings are present, it's difficult to understand if we are at the beginning or ending to stop editing/checking pages (for example, I find very annoying when you click on "Save + Next" and only then the message "There is no editable next page to edit." appears...) But your work is very intersting, so I tried to edit your code (I forked it from your repo and pulled a request). Basically, I think that if the next or prev page id is "0", so we can decide to hide the relative links and show First/Last, as needed. I added few code lines into your module to implement last and first placeholders and labels, new logics into .js file to check ajax response (ids and urls) and few rules into .css file. Also added a condition to hide links if only one items is present (so no navigation needed). Currently I tested all only in Tabs, and all works fine. Hope this could be helpful. I think I will try to insert also a link to parent page (just to complete a full nav "scheme"), and maybe to go further and finish the editin also for UI specific settings. PS This idea was initially born implementing new actions for Save and Next admin button (see here the post). Edited January 27 by Cybermano
Macrura Posted January 29 Author Posted January 29 Thanks @Cybermano, I will review this as soon as possible (and I'll check the PR). 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now