ProcessWire Weekly #473

In the 473rd issue of ProcessWire Weekly we'll check out latest core updates, introduce new third party module called Template Fragment Controller, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly. In this week's issue we're going to take a closer look at the latest development version of the ProcessWire, 3.0.219, and check out a brand-new third party module called Template Fragment Controller.

As always we'll also highlight a new site of the week — one that belongs to a luxurious, undisturbed, and private holiday resort located at the mountains of Austria; hideaway apartment known as s’Gmiatli (which means "cozy" in local dialect, just for the record).

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

This week's core updates, introduced by Ryan in a weekly update at the support forum, are primarily about an internal overhaul of the Modules class, and shouldn't affect the way the core behaves.

As Ryan explains in his post, the Modules class had become a tad too large for its own good along the years, consisting of more than 5000 lines of code. This week this class was split into multiple classes, all dedicated to a specific feature, while the main class was left to work as a gatekeeper for those individual, more manageable classes.

Again, nothing was (intentionally) taken away or added, so everything should work just as it did before, including the $modules API. That being said, this is a major update, so if you're using the dev branch be sure to test carefully and submit an issue report via the processwire-issues repository if you run into any unexpected behaviour.

That's all for our core updates section this week. For more details, be sure to check out the weekly update from Ryan at the support forum. Thanks!

New module: Template Fragment Controller

Template Fragment Controller is a third party module created by BitPoet, currently at a proof of concept stage. This module was designed to work together with ProcessWire's built-in markup regions feature, adding support for a couple of new features:

  • Template file with markup regions is automatically split into files for each region, which and can then be requested separately by providing GET param "regions" — e.g. /your-page/?regions=content,sidebar.
  • Each template file is also automatically connected to a controller class, which should be placed in the templates directory and named after the template file itself, e.g. you would have /site/templates/mytemplate.controller.php for class called MytemplateController if your template file is mytemplate.php.

In addition to being able to request regions one by one (or select ones at a time), you can additionally get the return value as JSON by providing GET param json=1 with the request. This can be particularly useful when combined with AJAX requests.

(If all this seems a bit vague, don't worry — there are sample files available via the GitHub repository for this module.)

There are some caveats here, such as actions like append, prepend, replace, after, etc. being completely ignored and each markup region requiring unique ID. Since this is a proof of concept module, it may or may not work as expected, and may or may not be developed further. If you'd like to give it a try anyway, download or clone it from the TemplateFragmentController GitHub repository.

Thanks to BitPoet for creating and sharing another very interesting module with us!

Site of the week: s’Gmiatli – Hideaway Apartment in Ischgl

Our latest site of the week belongs to s’Gmiatli, a hideaway apartment located in the mountains in Kappl, close to Ischgl, in western Austria’s Paznaun Valley.

The website for s'Gmiatli includes details about three apartments available for rent, including plenty of pictures and of course a pricing table; services available for visitors; and finally the activities, both during winter and summer, available at or near Kappl.

In addition to having plenty of quality content to offer, the design of this site is simply gorgeous. The layout is modern and has enough variety to keep things interesting, and the interesting choices made in terms of typography add loads of character to the site without hindering readability one bit.

As for behind the scenes details, the front-end of this website is powered by the Uikit front-end framework, and the back-end is — obviously — powered by ProcessWire. At least one familiar non-core module is also being used on this site, and that would be the commercial caching and minification solution ProCache.

Big thanks to the folks at Werbeagentur Buerostark for sharing this project with us, as well as choosing ProcessWire as their go-to CMS. Also our congratulations to the client for their new, ProcessWire powered website!

Stay tuned for our next issue

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