In the 314th issue of ProcessWire Weekly we're going to cover the latest core updates, check out a new module called Fieldtype Color Options, and more. Read on!
Welcome to the latest issue of ProcessWire Weekly. This week we've got some new core additions — including a brand new core class called PagesParents — to introduce, and we're also happy to share a new third party module called Fieldtype Color Options.
In other news we've got a list of recent forum posts, which this time includes, among other things, a whole bunch of new tutorials ranging from some pretty simple GUI-level stuff to a deep dive into dependency management in PHP and ProcessWire.
Finally, our latest site of the week belongs to a German company dealing with pastries and bakery products: IBIS Backwaren. Their newly released, ProcessWire powered site was designed and developed by schwarzdesign. Stay tuned for more details!
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.156 contains fixes, optimizations, and an all-new PagesParents core class
In this week's core updates post Ryan covers ProcessWire 3.0156, the latest dev version available via GitHub. 3.0.156 includes fixes for various issues reported via GitHub, as well as some new features:
- The biggest addition in terms of effect on the core — although Ryan goes on to state that this will likely have little use outside the core for now — is the new PagesParents core class, made accessible as
- Other new methods added this week include
$pages->getID(), which is an alias for
$pages->getByIDs(), which converts an array or CSV of IDs into a PageArray object.
- Major rewrite of $sanitizer->selectorValue(). New version of this Sanitizer method supports additional parameters and is better at handling edge cases.
Quick facts for PagesParents — what, why, and for whom?
Without getting too much into detail here, the reason that PagesParents is so important even if it's not going to get a lot of use outside of the core is that it massively optimizes the management of the pages_parents database table.
This database table gets involved in queries where "page family relations" are involved, particularly further than one level up. That one level part is crucial, since a page knows its direct parent, but not its grandparents. As a site grows, so does pages_parents, but after this week's optimizations moving pages on a massive site or even recreating the entire parents table from scratch will no longer result in notable delays.
For most of you, this is something that happens completely automatically. If you'd like to learn more about the background process, though, be sure to check out this week's core update post at the support forum. Long story short is that the core just got a lot faster — particularly in edge cases — and that's largely due to PagesParents.
That's all regarding the core updates this week. Check out the dev branch commit log for more details, and Ryan's post at the support forum for additional pointers on the newly added API feature $pages->parents(). Thanks!
New module: Fieldtype Color Options
This week we have one new third party module, and that is Fieldtype Color Options — a new fieldtype developed by Christoph "kixe" Thelen. This is an addition to the existing FieldtypeColor module, but implemented as a stand-alone feature extending the core Options fieldtype.
Fieldtype Color Options lets you configure a predefined set of colors, which are then displayed as selectable options for content editors. Supported selection methods include select, select multiple, checkboxes, and radio buttons.
Big thanks to Christoph for developing this module and sharing it with us. This is a very simple option for anyone requiring a color picker with predefined options and enough GUI to make the options easy to grasp. Very nice work!
Weekly forum highlights, tutorials, and other online resources
Here's a list 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.
- If you'd like to get a little sneak peek into what others are using behind the scenes on their ProcessWire sites, there were a couple of topics in April you might want to check out: Best module in 2020, and Most used module in ProcessWire. Check 'em out for some nice references, and feel free to post your favourite modules as well!
- First in line for our set of tutorials this week: a walkthrough by Horst for changing the ProcessWire default language to something other than English. Pretty basic stuff, yet also something that comes up regularly, so big props to Horst!
- While it may be "just" a reply to a question on the support forum, this post by Robin Sallis about setting up a custom gallery field and embedding it into your content (directly or via Hanna Code) definitely deserves a mention. Great stuff!
- Next up is a tutorial so well written that both seasoned developers and complete newcomers should find it worth checking out: namespaces, autoloading and PSR-4: ProcessWire's class loader demystified. Moritz L'Hoest really did an amazing job with this one — definitely worth checking out!
- While there's always room for detailed tutorials, sometimes we all prefer just the facts with no fluff whatsoever. That's what szabesz has done with his compact yet easy-to-grasp Markup Regions cheat sheet.
Last but not least, Bernhard recently made an offer to anyone interested in learning to build Fieldtype/Inputfield modules in a hands-on way: he'll share his know-how, while you learn by building a module — under his guidance and supervision, of course — that can then benefit the community as a whole. If this sounds exactly like your cup of tea, don't hesitate to drop him a note via the forum.
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: IBIS Backwaren
Our latest site of the week belongs to IBIS Backwaren, a brand for international pastries and bakery products. IBIS has been on the business for nearly 30 years, and their product line consists of a vast collection of different types and flavors of breads and pastries.
The ProcessWire powered website of IBIS Backwaren was designed and developed by schwarzdesign, and its features include a product database and online product finder, a dedicated site section for recipes, and support for creating and customizing the look and feel of a individual pages based on existing brand materials.
The IBIS website is bilingual, though as of this writing the English version hasn't been released yet. The showcase forum thread for the IBIS website contains a list of third party modules used on the site, and these include ProFields, FormBuilder, WireMailSMTP, Cache Control, and MarkupSitemap.
For more details, be sure to check out the showcase post at the support forum. Thanks to the folks at schwarzdesign for sharing this project — brilliant stuff as always — and our congratulations to the client for their new website. Keep up the great work!
Stay tuned for our next issue
That's all for the 314th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 23rd of May. 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!