The 113th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
Welcome to the latest issue of ProcessWire Weekly! This week we've got one third party module, some pretty awesome syntax additions to built-in page finding features, and a collection of interesting forum posts and other online resources. Of course we'll also be introducing our latest pick for the site of the week, so stay tuned for that too.
Thanks to all of our readers for being here with us again, and as always, feedback is always welcome – please don't hesitate to drop us a line if there's anything in your mind you'd like to share with us. Enjoy our latest issue and have a great weekend!
Latest core updates: ProcessWire 3.0.25 and 2.8.25 improve page finding
According to Ryan's latest post at the processwire.com blog, ProcessWire 3.0.25 and it's non-namespaced sibling, 2.8.25, introduce a neat new option for finding pages: a.b.c
selectors. This feature was originally requested via GitHub and has already turned out to be a very welcome addition.
In other news there have been some minor fixes and improvements to the core this week, and even some smaller yet potentially quite useful new features. We'll cover these in more detail soon, so stay tuned for that.
Introducing the a.b.c syntax
Typical selector structure is something like field=value
, but in the case of Page fields, Repeaters, and PageTables field.property=value
is also supported. This so-called a.b
syntax is often quite useful, but it doesn't solve the needs introduced by deeply nested data structures. That's where a.b.c
syntax comes into play:
// this was always possible:
$architects = $pages->find("template=architect, city.title=Chicago");
$buildings = $pages->find("architect=$architects");
// but now this works too:
$buildings = $pages->find("architect.city.title=Chicago");
// and so does this:
$buildings = $pages->find("architect.city.state.abbr=IL");
// or even this:
$buildings = $pages->find("architect.city.state.country.abbr=USA|CA");
Actually it's more like a.b.c.d...N
syntax since you can nest or chain the properties as far and deep as you need to, but the gist of this feature is that instead of having to rely on potentially complex sub-queries or finding pages in multiple steps, you can now use the familiar dot syntax to access nested properties.
It's worth noting that the a.b.c
syntax works with database selectors and not with in-memory ones, and it will not (yet) support some of the more complex use cases one would usually solve using OR-groups or sub-selectors.
Other core additions this week
Other additions to the core this week include support for generating random passwords using newly added randomPass() method of the Password core class, and new methods for sanitizing ASCII letters, alphanumeric characters and digits using the Sanitizer core class: $sanitizer->alpha()
, $sanitizer->alphanumeric()
and $sanitizer->digits()
.
There have also been some bugfixes and smaller tweaks and improvements for the core code. If you're using one of the development branches right now, upgrading is definitely recommended, though none of the issues fixed this week have been real showstoppers.
For more details, don't forget to check out Ryan's latest post at the processwire.com blog. If you have any questions related to the weekly updates, you can also use the dedicated support forum thread for those. Thanks!
Reintroducing Process Link Checker
Process Link Checker adds the capability to check links found from the content of your site and identify those that are either broken – unreachable or return a known HTTP error code – or redirect the visitor to another location. Running a check like this regularly has a healthy effect on your content, and thus the experience the visitors of your site get.
While in many ways similar to external online or browser side tools like the W3C Link Checker, being a ProcessWire module Process Link Checker has two obvious benefits:
- Since it has direct access to your site, it can easily check content inaccessible for outside crawlers: intranets, extranets, and any other restricted areas of the site.
- It is intended to be scheduled and has various settings for balancing the load it generates, all in order to cause as little disruption for the host site as possible.
The title mentions "reintroducing" since this module was actually released back in 2014 as an early alpha version. Since then there have been many updates, but this should still be considered a beta release. Some extra caution is definitely recommended, in part because the module hasn't been widely tested yet.
The GUI of the module consists of various separate features: a dashboard for a quick overview of your site's link health, lists of broken links and redirects – and a separate list for links marked as skipped – and a "check now" tool for running the link checker. The module ships with separate permissions for basic use and the "check now" tool.
While the link checker can be started directly via the web GUI, this is not the intended use case. The "check now" feature is best suited for debugging and it is recommended that the check be activated using cron or similar server-side method. The README file contains basic instructions for setting up a cron task for the module.
For more details, check out the GitHub repository for Process Link Checker. All questions and comments are most welcome, either via the support forum thread or GitHub issues. Thanks!
Weekly forum highlights, tutorials, and other online resources
Here we've got a new collection of support forum highlights and other useful and/or interesting resources. As always please let us know if there's anything important we've missed so that we can include it in one of our future issues!
- First of all a little treat for our Spanish speaking users: instalando ProcessWire is a ProcessWire installation video in Spanish by @clsource. Installing ProcessWire is a trivial task for many users, but a video like this works as a nice introduction too!
- Another useful resource from @clsource: Understanding ProcessWire Templates, Fields and Pages. This tutorial posted to Medium should be of particular interest to anyone with understanding of object-oriented programming and it's concepts, but it's simple enough to make sense either way. Highly recommended!
- Moving on to something a bit more advanced, @FrancisChung has been keeping his topic about testing ProcessWire using PHPUnit and Selenium up to date with an admirable devotion. This forum thread has just received two new sections, becoming a great resource for anyone interested in testing their sites.
- Finally, we've got a very read-worthy article about migrating to ProcessWire from another platform by M.O.Z.G Studio. You can probably guess which platform that would be. Anyway, this post is extremely detailed, so don't forget to check it out!
If you're interested in ProcessWire news, discussions, and updates, there's always something going on at the support forum. Since we're only able to include a tiny selection of all that in our weekly updates, head down to the forum for more.
Site of the week: p.events
Our latest site of the week belongs to a German company called p.events. Located in Stuttgart, p.events plans and organizes events and provides catering services.
This site was briefly introduced in a forum post by Alex from DESIGN À POINT, the company behind both the corporate identity of p.events and the design and development of their new, ProcessWire powered website. According to Alex, they've got some additional future plans for the site, including a blog section and an inquire form.
The site itself is responsive, makes use of the touch-friendly Flickity carousel plugin, IcoMoon icons, and some pretty cool CSS3 features like the filter property. Other than that there's really not that much to say here: this is a well designed, good looking site with some great images and plenty of content to go with it.
Thanks to DESIGN À POINT for sharing their work with us, and congratulations to p.events for a great visual identity and a functional, good looking website!
Stay tuned for our next issue
That's it for the 113th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 16th of July. As always, ProcessWire newsletter subscribers will get our updates a few days later.
Thanks for staying with us, once again. Hope you've had a great and productive week, and don't forget to check out the ProcessWire forums for more interesting topics. Until next week, happy hacking with ProcessWire!
Post a comment