ProcessWire 2.5.2 and more

ProcessWire 2.5.2 pushed to master

The biggest news this week is that we've updated the master/stable version to 2.5.2. While there haven't been any major bugs found in ProcessWire 2.5.0, version 2.5.2 fixes several smaller and cosmetic details. It also adds some nice new features, as mentioned in the last couple of previous posts.

I'm also comfortable in now saying that ProcessWire 2.5 is officially released. It's been out there for a couple of weeks, reports have been very positive, and there have not been any major issues to surface that we are aware of. If you are not yet using ProcessWire 2.5, I don't see any reason to delay further. As always, if upgrading an existing site, make sure to test everything thoroughly on a staging/non-production server before upgrading your live server. Please see our upgrade instructions and there is also a section on upgrading from 2.4 to 2.5, which is what likely most are upgrading from.

What's changed between 2.4 and 2.5? Well quite a lot actually, here's a changelog. We're still adding contextual links and expanding on a few details, so consider it a work in progress.

This coming week we'll send out a press release introducing ProcessWire 2.5. Stay tuned for a more official announcement.

New beginner version of default site profile

There has been some feedback that the direct output method (used by the old default profile, now called classic profile) was easier for beginners to understand than the delayed output method used in the new default site profile. Of course, being easy-to-understand for beginners is very important to us. As a result, we've added another version of the default site profile called the Beginners edition. This edition uses the same exact strategy that was used by the previous default site profile (called direct output). The main default site profile has been renamed to the Intermediate edition. Read more about the beginner edition, intermediate edition and multi-language edition of the default site profile here.

Recent pages in your admin navigation

If you are following the dev branch, there's a new addition for you in 2.5.3. This adds a new "Recent" option to the Pages navigation. A screenshot probably explains it best:

This option will appear automatically when you install 2.5.3, no need to install anything else. Before this hits the stable branch, it will be updated with configuration options that enables you to adjust what gets shown.

New wireRenderFile() and wireIncludeFile() functions

This week we've added a couple of new functions that you might find handy in your own template files.

The wireRenderFile() is actually just a quick way to use the TemplateFile class. Give it a filename, and it'll pass the file all of PW's API variables, and it will render the file as a PHP file and return the output to you. If you want to send along some additional variables, just specify them in the second argument as an associative array. See the function definition for more. But here's a typical usage:

$photo = $page->photos->getRandom();
$sidebar = wireRenderFile("inc/fancy_sidebar", array('photo' => $photo)); 

We've also added a related wireIncludeFile() which works exactly the same way except that it does a literal PHP include() of the file for direct output, rather than returning the output to you. See the function definition for more. Some more points to mention about these functions:

  • They receive all of ProcessWire's API variables, and optionally your own specified variables (in the same way demonstrated above).
  • They assume a starting point in /site/templates/, unless you point them somewhere else.
  • They will only allow files that are somewhere within the directory structures started by /site/templates/, /site/modules/ or /wire/modules/ … adding a little more safety.
  • The .php file extension is assumed for any files you give it, so you can optionally omit it. Of course you can use a different extension if you want to, but just note that if the file has a .php extension, it's optional to specify it.

Post a comment

Twitter updates

  • New post: In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124— More
    11 January 2019
  • New ProcessWire main site rebuild ready for preview— More
    4 January 2019
  • Happy Holidays! This latest master version of ProcessWire contains hundreds of new additions, fixes, optimizations and more. This post covers all the highlights— More
    21 December 2018

Latest news

  • ProcessWire Weekly #244
    In the 244th issue of ProcessWire Weekly we'll cover the latest core updates, introduce the new processwire.com site, ask a PHP version related question in the weekly poll, and showcase the site of an open source room bookings app. Read on!
    Weekly.pw / 12 January 2019
  • ProcessWire 3.0.124 and new website launched
    In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124.
    Blog / 11 January 2019
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer