Skip to main content

New in Craft CMS 2.1

Craft CMS 2.1 Teaser

It's been two months since Craft 2 launched, and Pixel & Tonic is taking a look back at how things have gone so far.

The response to the new features and pricing model was overwhelmingly positive, and excitement surrounding the platform is at an all-time high right now. We feel so honored to be able to serve you guys – you’ve made this whole CMS thing a lot of fun.

— Brandon Kelly

Craft 2.1 brings 90 new features, mainly aimed at making editorial workflows and user management better. Craft 2.0 laid the groundwork, but 2.1 makes everyday editorial tasks easier, like sharing drafts, managing versions, and setting up workflows.

The Share button

The most noticeable new feature is the Share button, which you'll find next to the Live Preview button. It creates a link that works for a limited time and lets someone view the current entry, draft, or version on the front end without needing to log in.

Before 2.1, if you wanted to show a draft, you had to send a screenshot or let the client into the control panel, which wasn't ideal. The Share button fixes this with a simple, time-limited link that doesn't need a login. After just one day using it on their own site, Pixel & Tonic decided it was a must-have.

Entries and versioning

Draft notes 2.0

The draft and versioning system got a major update in 2.1. Here are the main changes:

  • You can now save entries as drafts right away, without having to publish them first.
  • Drafts can have custom names and notes. For example, you might call one "Homepage Redesign v3" instead of just "Draft 1."
  • You can add change notes when you save, much like leaving a message with a Git commit.
  • If you need to, you can bring back older versions using the "Revert entry to this version" button.
  • You can turn versioning on or off for each section as needed.
  • The system now warns you if you try to leave a page without saving your changes.
Entry Version in Craft 2

New config settings

Craft 2.1 adds a lot more configuration options. Here are some of the most helpful new settings:

  • useEmailAsUsername – removes the username field and uses the email address as the login directly
  • generateTransformsBeforePageLoad – generates image transforms on save rather than on the first page request, which improves performance on image-heavy sites
  • isSystemOn – lets you control system status via config rather than only through the control panel, enabling maintenance mode via deployment
  • purgePendingUsersDuration – automatically deletes unconfirmed user accounts after a configurable period
  • autoLoginAfterAccountActivation – automatically logs users in after confirming their email address

Assets

In 2.1, you can use almost any filename you want. You can also rename files right in the edit modal, so you don't need FTP access. The maximum upload size can be set with maxUploadFileSize, and the new imageDriver setting lets you pick between GD and Imagick.

Templates

Now you can query entries, assets, and categories directly by their title. The |date filter will automatically translate month and weekday names based on your site's language. New craft.request.* methods also let you access user agent, referrer, host info, and IP address right in your templates.

My take

Craft 2.1 marked the point where Craft started to go beyond just a developer tool. The Share button with tokened URLs fixed a problem anyone who needed client approval on a draft would recognize. The new draft system added versioning, change notes, and the ability to go back to earlier versions, features editors were used to in Word or Google Docs but hadn't seen in a CMS before.

Not everyone used drafts all the time, but just having the option showed that Craft cared as much about editorial workflows as it did about technical features.

Thomas Sausen

Web Developer

Self-employed web developer from Germany who started with WordPress websites in 2005, then moved to ExpressionEngine and lost his heart to Craft CMS in 2013. As the founder of Craftentries, he has been covering the Craft ecosystem since 2015.