Bryn Whyman,

With the beginning of the new year here, we wanted to start it off with a new version of CWP. Introducing the latest release, we’re bringing you CWP 2.7! Now, you can take advantage of an improved view for your Content Editors to track where files are being used in your project. And for your Developers? We’ve included the ability for Developers to trigger actions from the toast notification component plus a wide range of house-keeping improvements and fixes made by the Silverstripe CMS community.

As per usual, this release follows semantic versioning(external link), so it’s ready to be used in any current CWP project right now.

What’s new in CWP 2.7?

Taking advantage of the recently released Silverstripe CMS 4.7, the key benefit of this CWP release for your Content Editors is the improvement made to the Files area to track where individual files are being used across your site. We’ll cover off why this improvement was made and how it can help you keep the Files area in your project under control.

And for Developers, there are a few headlines for you, including:

  • The ability to include ‘actions’ in the toast notification component
  • Ongoing work to keep dependencies up to date

We’ll unpack each of these new features below, or if you’re keen to get your upgrade underway now, we’ve got some next steps for you to get started.

For your Content Editors

More information on where files are being used

As content evolves for any website, it’s pretty common for files to accumulate at a fast pace. So it’s important to have tools to keep track of how these files are being used (if at all!).

The Used on tab located in the details area for each file is a key tool to support this in Silverstripe CMS.

Example of "Used on" tab in Silverstripe CMS

While this is an existing feature, this release brings a revamp to the information that’s presented, focusing on three important points.

The location of file use is clear

Now, you’re able to understand at a glance where exactly a file is used. Below, you can see that this image is being used in several areas of the website, including a custom carousel block and two different blog posts.

The "Used on" tab in Silverstripe CMS

Direct links to files in use from the Used on tab

It aims to give you enough information and context on the usage of the file before you need to click the link and remind yourself of how the file is being used.

Link directly to the file

You might see from the Used on tab that an image file is being used as a featured image in a number of different blog posts or pages. This is enough information to imply the image is being overused, so it makes sense to swap it for a new image in some places.

Using the context of where it’s being used, you have the option to go directly to the instance of the file in use. That link will take you to a page to edit, a blog post, or another object that’s using the file.

Uncovering more uses of a file

Historically, this feature had not been considering all of the different ways a file could be referenced within a project, specifically when it comes to areas that have been customised by a Developer. This scope has been broadened to show a true reflection of where each file may be used.

You may see more references to where a file is used now—information that’s important to see if you’re planning to remove or change how that file is being used.

Your Developers will see the scope broadened to reference files that are managed through a `$has_one` or `$many_many` relationship with a DataObject, as opposed to historically just `$owns` relationships. They also have the ability to customise the way these entries are rendered (for example, adjusting the name or type.)

For your Developers

Improved toast notifications

The toast notification component can be used in the CMS to provide the user a temporary notification, advising that something has been altered. Common examples built-in to the CMS can be seen when publishing a page, or deleting a file:

Toast notification when a page is published in Silverstripe CMS

New to this component is the idea of an ‘action’. Now, your Developers can add their own custom ‘action’ to a standard toast notification, or to one you may have created for your project’s own use case. In the example below we see a toast notification confirming a file has been moved and offering an action to go directly to the new destination folder.

Toast notification when a page is archived in Silverstripe CMS

If you’ve got some ideas for creating or modifying existing toast notifications, check out the implementation notes in the Silverstripe CMS changelog(external link) and further details in the Silverstripe CMS pattern library.

Keeping up-to-date with dependencies

The past three months have seen a focus on keeping some underlying dependencies of Silverstripe CMS up-to-date. These are mostly transparent but necessary changes to ensure the many parts that help make up Silverstripe CMS are secure and reliable on an ongoing basis.

Dependency compatibility/ upgrades in this release include:

  • Compatibility with Symfony 4, after Symfony 3 moved to ‘security fixes only’ in November
  • Upgrade to the latest major version of Reactstrap
  • Support for Composer 2

General improvements

As with all new releases, we also see a broad range of improvements contributed by the development community. Be sure to check out the details of these and who’s contributed in the new and improved CWP changelog format.

Keen to get your upgrade underway?

Talk to your Digital Agency or Developer about upgrading

Haven’t got a Developer or Agency? You can request support with your upgrade through the CWP Service Desk.

Developers, check out our documentation

This release announcement does not cover the full detail of what is included in the release. Be sure to review the full changelog before planning your next site upgrade.

Head to our Developer Docs to view the CWP 2.7 changelog.

Back to the news

Last modified: