adrian Posted August 24, 2017 Posted August 24, 2017 58 minutes ago, PWaddict said: I replaced "saved" with "published" Good point - sorry, I didn't think of that, but what about using "added" instead?
tpr Posted August 24, 2017 Posted August 24, 2017 39 minutes ago, PWaddict said: I just test it and it works great. I replaced "saved" with "published" otherwise everytime my client will edit the pages sorting will applied. So for PW 3.0.46+ no need this module. This could be part of AOS, perhaps with an option what templates to include. 4
adrian Posted August 24, 2017 Posted August 24, 2017 18 minutes ago, tpr said: This could be part of AOS, perhaps with an option what templates to include. Sounds like a great idea. I would still perhaps suggest Pages::added, rather than Pages::published though - what does everyone else think? 2
PWaddict Posted August 24, 2017 Posted August 24, 2017 4 minutes ago, adrian said: Sounds like a great idea. I would still perhaps suggest Pages::added, rather than Pages::published though - what does everyone else think? You're right. I replaced "published" with "added" and it's even better cause now the unpublished ones are getting sorted properly too. Thank you. 24 minutes ago, tpr said: This could be part of AOS, perhaps with an option what templates to include. What AOS means? 2
horst Posted August 24, 2017 Author Posted August 24, 2017 Embedded into AOS is pretty good! Wondering why not use this hook: https://github.com/horst-n/PageTreeAddNewChildsReverse/blob/master/PageTreeAddNewChildsReverse.module#L48
adrian Posted August 24, 2017 Posted August 24, 2017 36 minutes ago, horst said: Embedded into AOS is pretty good! Wondering why not use this hook: https://github.com/horst-n/PageTreeAddNewChildsReverse/blob/master/PageTreeAddNewChildsReverse.module#L48 Pages::setupNew won't work for this because the page doesn't exist yet when you try to sort it to the first (0) position. 1
bernhard Posted July 26, 2021 Posted July 26, 2021 Hey @horst is this module still necessary? I think there have been some improvements to $pages->sort() some time ago so that this solution by @Robin S might be better than your module? Or am I missing something? 1
adrian Posted July 26, 2021 Posted July 26, 2021 @bernhard - I've been using the feature built into AOS for this. You can see the code for it here: https://github.com/rolandtoth/AdminOnSteroids/blob/2e8f9c56dbc0d05edcb203d7dcf9af31eb862b02/AdminOnSteroids.module#L780-L796 1
bernhard Posted July 26, 2021 Posted July 26, 2021 Hey @adrian thx that is the same that @Robin S proposed just without using AOS ? 2
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