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 24
  • Thanks 3
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 5
Posted

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

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

  • Like 5
Posted (edited)

The following is written in somewhat hurry, but I'm sure most of you get what I mean. What Processwire really needs is:

  • Section for practical code examples. Searching through the forum gets tiresome and sometimes it can take hours to find what you're looking for. The API is good, but sometimes very opaque if you don't already posses good deal of knowledge about it.
  • Admin needs some kind of "settings" page that puts things like "password strength" in one easy to reach place. Basically everything the core modules do, should be here. Then if you want to edit something, it will point you to the right module. Currently a lot of core features are very fragmented and hard to find if you don't know they exist in the first place. I think them being in the modules is great, but one page that gathers all that information is easy to digest form would make it better.
Edited by MSP01
  • Like 4
Posted (edited)
22 hours ago, MSP01 said:

What Processwire really needs is:

I quite agree with your two points above.

  • "Section for practical code examples." They could be added to the method descriptions, and not just sample code strictly related to a given method, but code showcasing typical scenarios with related methods and often used techniques, "coding patterns".
  • "Currently a lot of core features are very fragmented and hard to find if you don't know they exist in the first place." So true! I have some notes of some important settings, which I often set up differently from the defaults, but having to look through them just to find something is time consuming. Some sort of clever way of gathering information and providing it in a categorized and digested way would help, I think.
Edited by szabesz
typo
  • Like 2

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...