The 193rd issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, core updates, sites, and more. Read on!
Hello there and welcome back to the 193rd issue of ProcessWire Weekly! In this issue we're going to take a closer look at two brand new third party modules and pick a new site of the week.
As you can see, this week there's no core updates post from Ryan, but that's for a pretty good reason. No worries, though: if all goes well, we'll get a new core update by next week – and meanwhile Ryan will get his new furnace. Fingers crossed.
As always, a big thank you to all of you for being here with us, and please don't hesitate to drop us a note if there's anything in your mind that you'd like to share. Your feedback helps us focus on the things that you folks want to hear more about.
New module: Fieldtype Business Hours
Fieldtype Business Hours, a new fieldtype and inputfield combination from Thomas Huijzer, is a surprisingly flexible useful tool for storing and displaying – as you've probably guessed already – business hours.
To get started you need to create a field using the fieldtype part of this module bundle and add it to any given template. Now, when you edit pages using said template, you'll see a simple interface with week days listed on the left, and text inputs on the right. In those text inputs you can type in the opening hours for the day in question.
Note that, as a nice little detail, you can type in multiple date ranges for each given day. The only requirement is that you type dates in 24h format, use a dash to represent time range, and separate multiple date ranges with commas: "08:00-11:30, 12:00-16:00".
When it comes to the front-end side of your site, the fieldtype module provides a bunch of helpful API level features for checking and outputting your business hours:
<?php echo $page->field_name->isNowOpen() ? 'Now open' : 'Now closed'; if ($page->field_name == null) echo 'Closed on Monday'; if ($page->field_name->inRange('11:00')) echo 'Tuesday at 11:00 open'; echo $page->field_name; echo $page->field_name->getEntries()->getFrom()->format('H:i');
All in all this is a really nice contribution from Thomas, so big thanks to him for sharing this module with us – keep up the great work!
New module: Template Once Per Parent
Template Once Per Parent is brand new module from BitPoet. What this module does is that it adds a new option for templates to only allow pages using said template to be used once per any given parent page.
In case you're wondering, this module could be quite useful for situations where, say, you have a "categories" page under your "news parent" – and you want to make sure that there are never more than one of those present. That's just one example, of course, but this is the kind of requirement that we seem to run into every now and then.
Big thanks to BitPoet for sharing your work with us. Always fun to see how a simple support forum post ends up turning into a fully functional module in a matter of days – or, in this case, hours!
Site of the week: Patina
Our latest site of the week belongs to a concept store called Patina, which is located at the Mirker Quartier in Wuppertal Nordstadt, Germany.
Patina specializes in furniture and items related to interior design, many of which are genuine vintage. You can see some of their artifacts, both those that have already been sold and those that are still available, on their "lookbook" page.
For more details check out the showcase thread at the ProcessWire support forum. Big thanks to Diogo and Erika of ED Design for their continued trust in ProcessWire, and congratulations to Patina for a wonderful new website!
Stay tuned for our next issue
That's it for the 193rd issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 27th of January. 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!