adrian Posted August 15, 2018 Share Posted August 15, 2018 Works great now - thanks! 1 Link to comment Share on other sites More sharing options...
adrian Posted August 20, 2018 Share Posted August 20, 2018 Hey @Robin S - weird bug when editing a language page: PS - same goes for: Admin > Access > Users and I expect probably anything else that isn't a "normal" page. 2 Link to comment Share on other sites More sharing options...
tpr Posted August 20, 2018 Share Posted August 20, 2018 I've noticed this too. Link to comment Share on other sites More sharing options...
Robin S Posted August 21, 2018 Author Share Posted August 21, 2018 7 hours ago, adrian said: weird bug when editing a language page Thanks, should be fixed in v0.1.4. 2 Link to comment Share on other sites More sharing options...
adrian Posted August 21, 2018 Share Posted August 21, 2018 2 minutes ago, Robin S said: Thanks, should be fixed in v0.1.4. Looks to be working great here - thanks! 1 Link to comment Share on other sites More sharing options...
adrian Posted September 5, 2018 Share Posted September 5, 2018 Hey Robin - I am really loving this module - it's becoming one of my key navigation tools, so thank you! This might be feature creep so I definitely won't mind if you don't think this is a good idea, but I was thinking an "Add New" link at the top of each list could be quite useful. 2 Link to comment Share on other sites More sharing options...
Robin S Posted September 5, 2018 Author Share Posted September 5, 2018 v0.1.6 released - introduces a feature for adding a new sibling page, as requested above by Adrian. 5 Link to comment Share on other sites More sharing options...
adrian Posted September 5, 2018 Share Posted September 5, 2018 Awesome thanks so much - this is really speeding my workflow up today. 3 Link to comment Share on other sites More sharing options...
adrian Posted September 10, 2018 Share Posted September 10, 2018 Hey @Robin S - any reason why the find siblings method doesn't use "include=all" ? I am assuming it was just an oversight, but it would be nice to have please. Thanks! 1 Link to comment Share on other sites More sharing options...
Robin S Posted September 11, 2018 Author Share Posted September 11, 2018 On 9/11/2018 at 9:50 AM, adrian said: any reason why the find siblings method doesn't use "include=all" ? Yes, it was an oversight. As more states need to be indicated in the dropdown items it gets harder to come up with distinguishable and tasteful styles for all of them. I think the hidden and unpublished pages need to use the same styling as in Page List, so that means I've had to change the styling for uneditable pages - these are now indicated by italics and reduced opacity (and the "not-allowed" cursor for devices that support hover). Other changes introduced in v0.1.7: The dropdowns now take $page->listable into account, so non-listable pages do not appear in the dropdowns. There is now a hookable BreadcrumbDropdowns::getSiblings method in case anyone wants to override the listed siblings for a page. This won't be needed in most cases though. 1 Link to comment Share on other sites More sharing options...
adrian Posted September 11, 2018 Share Posted September 11, 2018 Thanks @Robin S - new version looks great! 1 Link to comment Share on other sites More sharing options...
adrian Posted September 12, 2018 Share Posted September 12, 2018 Just had another thought ? For pages with more than 25 siblings, I wonder if it would be worth putting the current page in the middle of the list of options, with 12 before and 12 after. At the moment, if the page being edited is beyond the first 25 it doesn't show in the list and so there is no way to access pages on either side of the current one. I think this is fairly efficient: public function ___getSiblings($page) { $numSiblings = $page->parent->numChildren(); $start = $numSiblings > 25 ? ($page->index - 12 > 0 ? $page->index - 12 : 0) : 0; while($numSiblings - $start < 25) $start--; $siblings = $page->siblings("start=$start, limit=25, include=all"); $siblings->filter("listable=1"); return $siblings; } Instead of this where you can't see page "27" in the list: you now get this with it right in the middle: You probably need to do some more testing to make sure there are no issues with sorting. Maybe the selector needs: sort=sort Did some testing here and it seems to be working great. 4 Link to comment Share on other sites More sharing options...
adrian Posted September 12, 2018 Share Posted September 12, 2018 Sorry, just updated above to make sure $start is not less than 0 Link to comment Share on other sites More sharing options...
adrian Posted September 12, 2018 Share Posted September 12, 2018 One more update to handle when you're close to the end of the siblings. There might be a better way to do this - this was just what came to mind quickly ? 1 Link to comment Share on other sites More sharing options...
Robin S Posted September 12, 2018 Author Share Posted September 12, 2018 5 hours ago, adrian said: For pages with more than 25 siblings, I wonder if it would be worth putting the current page in the middle of the list of options, with 12 before and 12 after. Great idea, thanks! Added in v0.1.8. 4 Link to comment Share on other sites More sharing options...
Robin S Posted September 14, 2018 Author Share Posted September 14, 2018 v0.1.10 released. Fulfilling a request by @adrian, if the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link. 6 Link to comment Share on other sites More sharing options...
adrian Posted September 14, 2018 Share Posted September 14, 2018 5 minutes ago, Robin S said: v0.1.10 released. Fulfilling a request by @adrian, if the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link. Awesome - thank you! Link to comment Share on other sites More sharing options...
Robin S Posted October 30, 2018 Author Share Posted October 30, 2018 v0.1.11 released. Thanks to a pull request from @adrian, this update wraps the last breadcrumb item in a link to the page tree (like the other breadcrumb items) and also standardises the page tree links so they always include an "open" parameter to load the tree opened to the clicked page. This is a change from the core breadcrumbs, which treats the link on parent breadcrumb item differently. There is discussion on this topic here: https://github.com/processwire/processwire-issues/issues/22 My opinion is that the breadcrumb tree links should be treated consistently, and if you want to go back to the page tree in its last state you can click the ProcessWire logo or "Pages" or "Pages > Tree" in the main admin menus. 3 Link to comment Share on other sites More sharing options...
adrian Posted November 20, 2018 Share Posted November 20, 2018 Hey @Robin S - looks like there is a bug when you're editing an unpublished page - it ends up messing up the $start value for the siblings selector so I end up with a list of pages that are nowhere near the page I am editing. Let me know if you can't reproduce and I'll see if I can figure out the problem later. Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2018 Author Share Posted November 20, 2018 22 minutes ago, adrian said: Hey @Robin S - looks like there is a bug when you're editing an unpublished page - it ends up messing up the $start value for the siblings selector so I end up with a list of pages that are nowhere near the page I am editing Thanks, seems like a core issue with Page::index(): https://github.com/processwire/processwire-issues/issues/751 Will see if I can find a workaround for the short term. 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 20, 2018 Author Share Posted November 20, 2018 @adrian, I've added a substitute getPageIndex() method to the module so the issue should be fixed in v0.1.12. Probably not as efficient as the core Traversal methods but should be okay unless you have a massive number of siblings. 2 Link to comment Share on other sites More sharing options...
adrian Posted November 20, 2018 Share Posted November 20, 2018 Thanks @Robin S - really appreciate the quick fix. I actually have ~5000 siblings and it still seems to be working ok. 4 Link to comment Share on other sites More sharing options...
dragan Posted February 13, 2019 Share Posted February 13, 2019 @Robin S Thanks a lot for this module. Is it possible to show also custom page list names? i.e. if I define in my template to use certain fields for page list {title} {client_name} {pl_active_only} {year} (edit template > tab "advanced") I still only see the default title being displayed. 1 Link to comment Share on other sites More sharing options...
adrian Posted February 13, 2019 Share Posted February 13, 2019 Just now, dragan said: @adrian Thanks a lot for this module. I think you mean @Robin S ? Link to comment Share on other sites More sharing options...
dragan Posted February 13, 2019 Share Posted February 13, 2019 ouch, sorry, of course ? Link to comment Share on other sites More sharing options...
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