ProcessWire Weekly #485

In the 485th issue of ProcessWire Weekly we'll talk a bit more about the main or master release from last week, check out a new third party module called Field Initial Value, 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 newly released stable version of ProcessWire (3.0.226) and provide some insight into what's new since previous stable release (3.0.210).

In other news we're going to introduce a brand-new third party module developed by Robin Sallis, Field Initial Value, and as always we'll highlight a new site of the week — one that belongs to Suspire Media, the UK based website design consultancy creating bespoke websites for charities, non-profits, and small businesses.

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!

In the processwire.com blog this week: introducing the ProcessWire 3.0.226 main/master version

The latest post in the processwire.com blog bears the title of ProcessWire 3.0.226 new main/master version, and it is an in-depth look into all the new features and updates that were merged to the master branch at the ProcessWire GitHub repository by last week's release — the culmination of 8 months of development work.

While we're not going to cover all the new features here, here are a few hand-picked highlights from the blog post, in no particular order:

  • New RTE (rich text editor) inputfield — TinyMCE.
    One of the biggest updates in this release introduced TinyMCE to the ProcessWire core bundle as an alternative (at least for now) to our existing CKEditor inputfield. Inputfield TinyMCE provides a whole new level of configurability and extendability, in addition to a very enjoyable editing interface.
  • New option to add custom buttons and actions for images in the page editor.
    Image field buttons and actions in the admin can now be easily extended by the developer, adding new options on a case by case basis. Some examples of how one might benefit from this can be found from the weekly update forum post introducing this feature.
  • New conditional hooks that match by argument type.
    The hooks system in ProcessWire is already quite feature rich, but there's always something we can improve, and this feature is a prime example of that: you can now add a conditional hook based on the type of an argument. For an example Pages::saved(<ProductPage>) triggers a hook method when a page is saved... but only if said page makes use of a custom page class ProductPage.
  • New WireNumberTools class for number related utilities.
    WireNumberTools is to numbers what WireTextTools is for text — utility class for bundling together useful, number-related functions that are commonly needed. The methods provided by this class at the moment include randomInteger() and uniqueNumber(), the names of which are probably pretty self-explanatory.
  • New cache storage options for the $cache API.
    By default, the $cache API (WireCache class) stores cached data in the database, but in some cases another storage method could make more sense — and this is now possible. WireCacheFilesystem is a module that changes the storage method to filesystem, and there's also WireCachePoetRedis, which is a (work in progress) WireCache module that stores data on a Redis server.
  • New multi-language month and day names.
    The WireDateTime class ($datetime API variable) now contains translations for month and day names, which means that when you use $datetime or wireDate(), it's going to be language aware.
  • Page Edit Restore module prevents data loss if session is lost while editing.
    This module is not strictly speaking part of the core or bundled with it, but it was developed alongside the core, and is still considered a potential core addition. In a nutshell this module attempts to keep the login session alive by automatically pinging the site, and if the user is logged out while editing, it can temporarily stash unsaved edits and restore them later.

The highlights covered here are just the tip of the iceberg, so be sure to check out the blog post for more details. And, as usual, there are also numerous behind the scenes updates; these include new versions of jQuery and jQuery UI, and various refactorings, performance updates, and PHP compatibility updates for ProcessWire's core itself.

This release was, once again, very much a group effort. A huge thank you to everyone who helped us get this release out, whether by directly contributing code, testing and reporting issues, or by suggesting new features for the core. Thank you all for making ProcessWire 3.0.226 yet another very successful release!

New module: Field Initial Value

Field Initial Value is a brand-new third party module created by Robin Sallis. What this module does is that it adds support for defining initial values for fields, so that when a new page is created, those values will be automatically populated. Initial values can be set in template context (per template), which makes them very flexible.

A screenshot of an initial value setting for a CKEditor field. Image by Robin Sallis.

In case you were wondering, ProcessWire does have built-in support for default values for fields, but there are notable differences between said core feature and the initial field value feature provided by this module:

  • Initial values are set regardless of where and how a page is created (e.g. via API), while default values only apply to pages created in the admin.
  • Initial values also apply for non-required fields, while default values only have an effect on required fields.
  • Initial values can be cleared, while default values cannot.

This module supports a wide range of fields, including Text and Textarea (and any field extending them), Page, Toggle, Integer, Decimal, as well as a few select Pro fields — such as Multiplier and Combo. On the other hand some field types that are (at least for now) not supported by this module include File, Repeater, PageTable, and the Pro field Table.

If you'd like to give this module a try, you can install it via the built-in modules manager in admin, or clone or download it from the Field Initial Value GitHub repository. In case you have questions or require further assistance, head down to the Field Initial Value support forum thread.

Big thanks to Robin for creating another useful module — a splendid idea, and great work as always!

Site of the week: Suspire Media

Our latest site of the week belongs to Suspire Media, which is a website design consultancy based near Salisbury, United Kingdom. The are specialized in designing and developing websites for charities, non-profits, and small businesses.

The services that Suspire Media provides for their clients include handcrafted websites and campaign microsites, tools for donations and fundraisings, SEO and social media consultation, and hosting and maintenance services for websites. And guess what content management system Suspire Media recommends for their clients? :)

We recommend ProcessWire – a secure, modern, low maintenance, open-source CMS specifically developed to make website management a breeze!

— Suspire Media

The website of Suspire Media provides details about the company and their services, includes a journal section and a portfolio of client projects, and of course provides an easy way to contact them. Design of the site looks clean and modern, with a splendid, minimalistic style, and well-placed photographs and customer project screen captures for adding a bit of extra spice to the mix.

As for behind the scenes details, the front-end of this site is built on top of the Uikit front-end framework, while the backend is (obviously) powered by ProcessWire. Some third party modules we were able to spot on this site include commercial Pro module FormBuilder and the simple, integrated page view tracking tool Page Hit Counter.

Big thanks to the folks at Suspire Media for sharing this site with us, as well as choosing ProcessWire as their content management system of choice for client projects!

Stay tuned for our next issue

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