ProcessWire Weekly #357

In the 357th issue of ProcessWire Weekly we'll check out ProcessWire 3.0.174, some forum highlights, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly. In this issue we'll check out the core updates introduced in ProcessWire 3.0.174, highlight some recent forum topics and other ProcessWire online resources, and check out a brand new site of the week.

Thanks to all of our readers for being here with us again, and as always, any feedback is most 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.174

In his weekly update at the support forum Ryan introduces latest core version, 3.0.174. This release builds on the URL hook feature added last week, adding new features, improving consistency, and simplifying a few things.

Improvements to URL hooks in 3.0.174

The blog post from last week has been updated with details regarding this week's new features. Here are the main things that've been added or changed since last week:

  • Simple named arguments add an easy way to declare named arguments within URLs: hooking into /my/{name}/ would catch provided name (as long as it's a valid page name) in both $hook->arguments('name') and $hook->name.
  • Whether trailing slashes are enabled or not depends on the syntax used: in case the hooked URL contains trailing slash (/some/path/), ProcessWire will enforce this. If you want to allow both, append a question mark: /path/?.
  • URL hooks now support pagination, assuming that you've appended placeholder {pageNum} in the hook URL.

3.0.174 also includes some behind the scenes updates and improvements, including one that will undoubtedly turn out to be quite useful: in case a page throws a 404, you can still hook into that URL. This will make a huge difference in cases such as URL segments being enabled for the home page, which would otherwise seriously hinder URL hooks.

Other core updates this week

In addition to aforementioned URL hook updates, this week we've also got a couple of pretty neat new options for the $pages->findRaw() method:

  • By default this method will return PHP arrays, but if you'd rather have it return objects, just add objects=1 to your selector string.
  • In case you're going to be using the returned value as part of HTML output, you can now add entities=1 to your selector string to automatically encode entities.

Here's an example making use of aforementioned features, as well as some other recent additions to the findRaw method:

$items = $pages->findRaw("parent=/blog/posts, fields=title|url, entities=title, objects=1");
foreach ($items as $item) {
    echo "<li><a href='{$item->url}'>{$item->title}</a></li>";

That's all for the core updates section this week. Be sure to visit the weekly update forum post for more details. Thanks!

Weekly forum highlights, tutorials, and other online resources

For this week we've gathered a list of support forum highlights and other useful and hopefully 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, we'd like to highlight a rather interesting site built by Ben Byford for his games design company, T&C or Technology and Creativity. Check the site out, and check out their upcoming game project Grace Hopper: Bug Rescue!
  • Next up we've got a site profile simply labeled as Template. Template is a bare-bones, minimal site profile with Osano cookie consent support built in. Check out the demo site as well.
  • Another highlight for the week is the ORCID login module. Based on the Login for Facebook module from Ryan Cramer, this module makes use of orcid-php-client by Sam Wilson, and provides authentication via the researcher platform ORCID.
  • This might not be exactly a full-blown tutorial, but a handy code snippet anyway: ever wondered how to easily embed custom styles and scripts into Admin Theme Uikit without introducing any additional modules for that purpose? Easy peasy!

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: Asianajotoimisto Kalasatama

Our latest site of the week belongs to the Finnish law firm, Asianajotoimisto Kalasatama. Their ProcessWire powered website was built by the Helsinki based marketing agency Nordenswan & Siirilä.

Kalasatama has offices in three cities, and they provide a wide range of services for consumers, companies, and public sector alike. According to their website Kalasatama focuses on absolute confidentiality, and their services are available to both local and international clients.

The Kalasatama website has a very stylish design, with plenty of white space and well-thought-out typography combined with consistent, bold, black and white photography. The design is simple and effective, and coupled with to-the-point content, the overall experience is professional yet not by any means boring or unlikeable.

Behind the scenes this site is powered by the Bootstrap front-end framework, and some other front-end dependencies, such as the offcanvas navigation library Pushy. The third party ProcessWire modules we spotted include FormBuilder and EmailObfuscator.

Big thanks to the folks at Nordenswan & Siirilä for sharing this project with us, and our congratulations to Asianajotoimisto Kalasatama for their new, ProcessWire powered website. Once again great work from everyone involved!

Stay tuned for our next issue

That's it for the 357th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 20th of March. 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