ProcessWire Weekly #527

In the 527th issue of ProcessWire Weekly we'll check out what's new in the core this week, introduce a new third party module called Lister Calculator, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly! In this week’s issue we'll take a quick look at a new feature added to the core this week, making it much easier to customize the admin search feature behaviour, right before digging into a brand-new third party module called Lister Calculator.

As always we've also got a new site of the week to highlight, and this week that site is OOH YES — a joint venture of a couple of German companies, Kasper Communications and Hoffman City Media, dedicated to offering out-of-home advertising opportunities for their clients. More about this very interesting site in just a bit, so keep on reading.

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

In the latest weekly update at the support forum, Ryan talks about ProcessWire 3.0.240, the latest dev version of the core. In addition to some bug fixes and an update for the TinyMCE Inputfield's JavaScript part that improves compatibility with other modules, there's also a brand-new feature added this week that allows you to easily extend the admin live search feature.

Until now customizing the search results has required a module that implements the SearchableModule interface, which has potentially made things a bit more complicated than they need to be, but as of ProcessWire 3.0.240 you can also modify the results using a simple hook. This is perhaps best explained with this example from Ryan:

$wire->addHook('ProcessPageSearchLive::findCustom', function(HookEvent $event) {
    $data = $event->arguments(0); // array
    $search = $event->object; // ProcesPageSearchLive
    $group = 'Pages modified today'; // description of this type of search
    if($data['q'] === 'today') {
        $items = $event->wire()->pages->find("modified>=today, include=unpublished");
        foreach($items as $item) {
            $search->addResult($group, $item->title, $item->editUrl);
        }
    }
});

The customization feature implemented here — a special action triggered by searching with "today" — is not all that useful in itself, but it outlines how you can easily customize the result set based on the provided query string. This is definitely a welcome update, and adds plenty of new and interesting ways to interact with the admin search, and provide a more tailored experience for our projects.

That's all for our core updates section for this week, but there's a lot more to learn about customizing the admin live search feature, so be sure to also check out the weekly update from Ryan at the ProcessWire support forum. Thanks!

New module: Lister Calculator

Lister Calculator is a brand-new third party module for ProcessWire, and at least for now a very simple one as well: it allows you to configure lister page and field combinations via the module configuration screen, and for each of these combinations it will add a simple total count — i.e. the sum of values in defined field for the result set, both current pagination page and all results.

Aforementioned counter — or multiple counters, if you've configured multiple fields for the same Lister — is added at the bottom of the Lister results, next to the pagination element. This element makes use of Uikit's badge element, so it will fit visually into Uikit theme (and, for that same reason, won't look very nice in admin themes not using Uikit.)

Note that this module is an early release, so there's not been a whole lot of testing so far, and it was built to work with Lister Pro (but should work with core Lister views as well.)

If you'd like to give this module a try, you can grab the module's source code from the Lister Calculator GitHub repository, or install it via Composer (composer require teppokoivula/lister-calculator). As of this writing the module is not yet available via the module's directory, but will be hopefully soon.

Site of the week: OOH YES

Our latest site of the week is called OOH YES, a joint venture by Kasper Communications and Hoffmann City Media. OOH YES is based in Freising, Germany, and they are dedicated to offering out-of-home advertising opportunities — such as billboards — for their clients.

The site itself is absolutely gorgeous, combining a nice and varied layout with plenty of interesting visual elements, and of course plenty of quality content and a good amount of examples of previous works to draw inspiration from. The site is divided into separate sections for different target groups, which is definitely a good idea, and gives a chance to outline exactly what the benefits of OOH advertising is for each individual client type.

As for behind the scenes details, the front-end of this site is based on a custom framework of sorts, so there's no full-blown front-end framework at play here. There are relatively few third party dependencies as well; mostly just the cookie management tool from CCM19 and PhotoSwipe. As for ProcessWire modules, one that we could spot on the site is FormBuilder, which has been adapted to the design of the site with a very nice custom design.

Thanks to the folks at Kasper Communications and Hoffmann City Media for sharing this very interesting project with us!

Stay tuned for our next issue

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