In the 351st issue of ProcessWire Weekly we're going to introduce the latest core updates, check out what's been happening on the support forum, and pick a new site of the week. Read on!
Welcome to the latest issue of ProcessWire Weekly! Hope you folks have had a great week so far. Now it's time to dive into some recent ProcessWire core news, as well as the latest hot topics on the community support forum.
In this week's issue we'll check out the latest core updates, which include a total of three new $pages API variable additions. We'll also highlight some interesting topics from our support forum, all related to the same central theme: page builders.
Last but not least we've got a brand new site of the week belonging to a Palm Springs, California based solar energy company called Renova Energy. There are some very interesting features on this site as well, so definitely check it out.
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: introducing three all-new $pages API methods
In this week's update Ryan subtly dropped some pretty neat new features, all of which are already available in the latest dev branch version: a couple of $pages API methods focused on fetching just the data you need efficiently, as well as a third method for always fetching a fresh copy of a page.
- $pages->findRaw() takes a selector and either a field name or an array of fields, and returns the raw, unformatted data for given field (or fields as) a PHP array. Field name may contain wildcards and you can also request subfield values.'
- $pages->getRaw() is the singular counterpart of $pages->findRaw(), with similar considerations as $pages->get (i.e. by default it returns the requested page with no exclusions).
- $pages->getFresh() is a special version of the $pages->get() method that always returns an uncached version of the requested page. This is pretty useful if, say, you need to compare current instance of a page with the unmodified version stored in the database.
find() vs. findRaw()
If you're wondering how much difference there might be between
$pages->findRaw() and regular
$pages->find(), Adrian posted on the forum a quick test where — in his setup — replacing
$pages->findRaw('hasParent=1', 'title') increased speed and decreased memory consumption almost tenfold.
That's a pretty significant boost, no doubt about that, but please keep in mind that this is a very limited test case and has little to do with most real world use cases: as we mentioned above the data from findRaw() is unformatted, basically just the value from the database. As such, these two methods are not really directly comparable.
In most cases dropping find() in favor of findRaw() is not an option, but under right conditions it could make a lot of sense, and provide a massive boost on performance. Anyway: in his weekly update Ryan said that he'll likely cover these methods in a future blog post, and we're definitely interested to hear more of his thoughts on the matter.
Be sure to check out Ryan's forum post for more details, and don't hesitate to drop a comment if you have any feedback or further questions. 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 off Jonathan Lahijani posted a very interesting video a while ago, discussing the YOOtheme Pro Builder for WordPress — which, just for the record, is developed by the company behind the Uikit framework — as well as some of his ideas for implementing something similar on top of Ryan's Pro module Repeater Matrix:
This was before some of the latest Repeater updates, mind you, so some of the issues found from Repeater Matrix in this video no longer apply. Anyway, past few weeks the most discussed topic on our support forum have been page builders, so this week we'll focus on that particular topic:
- First one is something we mentioned last week as well: the initial Page Builder proof of concept by Kongondo. The builder is clearly inspired by the YOOtheme Pro Builder, and there are some very interesting ideas here.
Here's a video demonstrating the capabilities of (an early version of) Kongondo's first Page Builder proof of concept:
- As if one page builder wasn't enough, Kongondo also dropped a second proof of concept: the Brad Field. The name (possibly a working title) is of course a hat tip to the Bard field in Statamic, which is where the Brad borrows some ideas from.
Here's a video demonstrating the Brad Field in action:
- Next up is a project called Page Table Grid. This module is being developed by jploch, and is likely going to be released as a commercial module at some point. It's a slightly different take on the page builder topic, capable of creating truly unique designs in no time.
Here's a video demonstration of Fieldtype Page Table Grid, running on Admin Theme Canvas for some added conciseness:
- Last but not least, it wouldn't be fair to skip FieldtypeEditorJs, the module that implements Editor.js library on top of a ProcessWire fieldtype and inputfield combination. In terms of maturity this module may be closest to release.
So many amazing experiments going on right now — interesting times indeed! We're excited to see how aforementioned projects might evolve, as well as what else might still be on the works!
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: Renova Energy
Our latest site of the week belongs to Coachella Valley’s leading solar installation company Renova Energy. An award-winning, employee-owned company, they specialize in solar panel installations for commercial and residential applications, also offering energy storage solutions based on Tesla Powerwall.
The website of Renova Energy was designed and developed in-house by Sky Lundy. In addition to a very nice design and varied layout choices, this site is also multi-lingual and (of course) works well regardless of the visitors' device type and size. One curious detail about the multi-lingual implementation is that the Spanish content was in fact authored using AI (machine learning):
It was the pilot website first implementing the Fluency translation module and is completely translated from English to Spanish by the DeepL machine learning translation service.
— Sky Lundy
The front-end of the site seems to be custom-built, with some help from third party JS libraries, such as the GSAP animation platform from GreenSock. As for what happens behind the scenes, all that stays behind the scenes, so — apart from the Fluency translation module — there's not much else we can say.
Thanks to Sky Lundy for sharing this amazing project with us, and our congratulations to Renova Energy for their new website. Looking sharp — great work!
Stay tuned for our next issue
That's it for the 351st issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 6th of February. 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!