ProcessWire Weekly #270

This week in the 270th issue of ProcessWire Weekly we're going to cover the SearchEngine module, feature some recent support forum highlights, and introduce a brand new site of the week. Read on!

Welcome to the 270th issue of ProcessWire Weekly! In this issue we're going to dive into the newly released SearchEngine module, highlight some recent posts from the support forum, and introduce a really neat new site of the week – or a group of sites, really, since it's a multisite – developed by Spiria for the investment company Walter Group.

This time we don't have a core updates section to share. With Ryan out of office for the whole week things have been a bit quiet. You can definitely expect some core-related news by next week, though, so stay tuned for that.

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!

New module: SearchEngine

SearchEngine is a new module with the goal of making it really trivial to create an index of page contents – stored within a hidden textarea field on each individual page – and adding a site search feature that finds content from the site quickly and efficiently, and displays them in a useful manner with minimal amount of custom code.

Current features of SearchEngine include:

  • Indexing page contents into a hidden textarea field – by default this field is called search_index, but it can be renamed to anything else as well.
  • Finder feature (accessed by calling $modules->SearchEngine->find($query)) that sanitizes the query and abstracts other repetitive tasks.
  • Finder returns a Query object, which contains actual results, some metadata about the query and the returned results, and a bunch of (mainly rendering related) aliases – such as "pager" for the rendered pager markup, and "resultsString" for a simple rendered list of results.
  • Support for both single-value fields and repeatable field types (such as Repeater and PageTable).

Using SearchEngine involves installing the module, defining indexable fields (via site config or the module settings screen), indexing pages, and then performing queries on the indexed data. Pages are indexed automatically when they are saved, but you can also trigger manual indexing from the module settings screen. Queries are performed using regular selectors:

if ($q = $sanitizer->selectorValue($input->get->q)) {
    $results = $pages->find('search_index%=' . $query_string . ', limit=25');
    echo $results->render();
    echo $results->renderPager();

... or alternatively by using the SearchEngine::find() method:

$query = $modules->get('SearchEngine')->find($input->get->q);
echo $query->resultsString; // alias for $query->results->render()
echo $query->pager; // alias for $query->results->renderPager()

There are plenty of new features planned for the module, including built-in search results renderer – current version is usable, but still pretty basic. Nevertheless, it can simplify adding a proper site search feature a lot, improving development time and making the site search feature more efficient for end users.

You can read more about this module (and clone or download the module files) from the SearchEngine GitHub repository – and if you require any support or have additional questions, head down to the SearchEngine support forum thread.

Highlights from the support forum

Here's a list of support forum highlights and other useful and/or interesting resources for the week. 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'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: the Walter Group – a multisite developed by Spiria

Our latest site of the week – or perhaps sites of the week, in plural – belongs to Walter Group. The Walter Group consists of four separate investment units, each with similar but still unique needs, which Spiria managed to solve by setting them up with a multisite installation with four main sites and two additional language-specific domains.

The sites that make up this multisite setup include (in English) and (in French), (in English) and (in French),, and

Right from the first look it's obvious that the design was meant to communicate a very professional, high-quality brand image, and that message comes through strong and clear. The sites look really nice, and the animations you'll quickly notice while browsing the sites make them feel lively while remaining well within the bounds of good taste.

In addition to the beautiful design – which, for the record, remains consistent across the sites – the sites also share some of their news, staff, and other content. Talking of content, there's actually quite a lot of it here, and it's rather enjoyable to read.

The Multisite module was designed to meet the challenge. A tree structure has been created with the four units, with news and management staff pages placed outside these sites so that they can be more easily managed by Walter Group. We also used FormBuilder for the four contact forms whose entries had to be directed to different people.
— Spiria

Overall the Walter Group websites are quite splendid, and we're happy to hear that not only did the project go well – largely thanks to the expertise of the folks at Spiria, of course – but the client also seems happy with the end result. Congratulations to Walter Group for their new sites, and thanks to Spiria for sharing this project with us!

Stay tuned for our next issue

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