Jump to content

PW 3.0.8: Smarter+faster page tree and a ProDrafts update


Recommended Posts

Posted

Thanks, glad you guys like it. I've lately worked on some projects here with a lot of pages deep in the site (and paginated no less), and the PageList bookmarks weren't cutting it. I found myself keeping two browser tabs open all the time so that I could keep my spot in the PageList. So I've been motivated to make this work better, but always got held up trying to figure out exactly how. Basically the goal has been to make the PageList behave as if it was an offcanvas panel that was always ready for you where you last left it. 

Back in PW 2.5 dev I was experimenting caches of the PageList, but the problem was that any changes in PageEdit could then make that cache stale, really limiting the utility of it. Last week I started messing with <link rel='prerender' href='...'> tags to the opened page list in order to keep a ready-to-use pre-rendered PageList that I could get to whenever clicking the "Pages" tab... it was quite cool, and instant, but also a real waste of background resources to be pre-rendering a PageList (and all the ajax requests) in the background while in the page editor. But just going through that process led to the current result, which uses JS cookies to remember the spot, and lets PageList perform a pre-render of what was previously split into multiple ajax requests. It's not as fast as using the link prerender tags but a lot more reliable and less wasteful of resources, so seemed like a good compromise. 

Thanks for implementing my feature suggestions just a week after I posted about it. 

I had not seen that, wish I could say I had. But sounds like we're all on the same wavelength here! 

Works like a charm. Just tested it with a parent page having 4k children. Awesome!

Great! Yeah it should run at the same speed regardless of quantity of children. I think one of the next improvements we'll want to look at is the ability to filter by text in the PageList. For instance, if you typed "something" in a text input, it would open all the branches directly to pages having the word "something" in their label. I think this has been brought up by others in the past too. The current search box in the masthead kind of does this already, but without any context of where those matches are, which is something the PageList could do. This could be handy in so many instances. 

  • Like 7
Posted

I think one of the next improvements we'll want to look at is the ability to filter by text in the PageList. For instance, if you typed "something" in a text input, it would open all the branches directly to pages having the word "something" in their label. I think this has been brought up by others in the past too. The current search box in the masthead kind of does this already, but without any context of where those matches are, which is something the PageList could do. This could be handy in so many instances. 

This sounds almost like the proposal in issue #1619, though assuming that you're talking about the ability to filter the whole Page List at once the scope is somewhat different. Anyway, if I got this right I really like the idea :)

Posted
This sounds almost like the proposal in issue #1619, though assuming that you're talking about the ability to filter the whole Page List at once the scope is somewhat different. Anyway, if I got this right I really like the idea

That's exactly right, filtering the entire page tree at once, not just 1 level of children in a branch. 

  • Like 4
Posted

It's usable (e.g. processwire.com is using it already) but it's still in heavy development, so there aren't any guarantees. You'd make up you own mind if you want to use it. You could always give it a try locally. 

  • Like 2
Posted

Seems like a bug to me (maybe file a bug report in github?).

Also - I would really suggest some container templates / pages to keep pagetree in order. I feel it messy to add all directly under home page. Although I don't know your project or use case there, so take this just as suggestion, not as a blame or critic :)

Posted

yep I know it's messy but I need those pages directly under the home...my SEO requested so... :) and I don't want to create some htaccess tricks to remove the container page between home and those pages

  • Like 1
Posted

Anyone having issues with page copying (clone)? I got an ajax loader spinning but error in the console "502 (Bad Gateway)" (JqueryCore.js).

The page is cloned successfully though.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...