Jump to content

Recommended Posts

Posted

This week on the core dev branch there are several new hookable methods added to the Page class. While many of them may be redundant with hooks already available on the Pages class, those on the Page class are more convenient to use in some cases, especially when it comes to using custom Page classes. It's helpful because you can hook CustomPageClass::method rather than Page::method to more easily target specific types of pages. Or you can override the methods in a custom page class, without having to hook them at all. I'll get into this with more details and examples in a future blog post that goes in-depth on using custom page classes. Here's a summary of the methods that were added with links to their API reference documentation pages:

The above is just for this week, but there's quite a bit more in 3.0.253 relative to 3.0.252, so be sure to check the last issues from ProcessWire Weekly for more details. 

  • Like 10
  • Thanks 1
Posted
1 hour ago, ryan said:

in a future blog post that goes in-depth on using custom page classes

That will definitely be welcome, for sure! Thanks in advance.

  • Like 2
Posted

Always wanted those on Page. Even before custom classes existed. Great addition!

I thing that custom classes truly need more introduction and use cases. So eagerly waiting for Ryan's upcoming blog post.

  • Like 1

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
×
×
  • Create New...