Coaster CMS v5.4 is here

So, Coaster CMS v5.4 has arrived and I’m just going to give you an overview of the new features. We think this update will really help people grasp the concepts around Coaster and give you ideas on how you can use the blocks in Coaster to extend functionality.

Blocks

As of Coaster CMS v5.4, all blocks can now have multiple views in the themes/[theme_name]/blocks/[block_type]/ folder – this adds consistency to the block behaviour and greatly enhances the flexibility the block system. Basic string blocks won’t need a view to display them but you can now pass a ‘view’ key through in the $options array that will look in the appropriate folder for the view. So, say you wanted to wrap a string in certain tags or content each time you could add a view that you pass through when you need the string block in that format.

In addition, all block libraries “display” functions will return strings, there are new data functions “blockData” and “blockJson” should you need direct access to data in blocks such as stringwprice.

Themes

We have a new theme called Coaster 2017 – we think it’s great and more themes will be coming to help get you started with Coaster.

To help with theme development the Theme Review feature has been greatly improved to offer clearer information. It’s been rewritten from the ground up to be cleaner and easier to use.

For each block, it shows what page templates it appears in and if the block is inside any repeaters (or if it has any child blocks if it is a repeater). Any updates to these templates and any block attributes are shown in detail.

Also, different installed themes can use the same template names now without there being any conflict in the template to block relations.

Caching

A full page caching system has been added. This cuts load times, especially if you have pages which need to load large sets of block data. By default, the cache length is set to 4 hours but this can be altered in the admin or turned off with a value of 0.

Menus

The menus system is now more customisable, you can now rename and hide submenu items in the admin.

Separate Service Providers

We have separated out the Coaster routes into a separate service provider which greater control of how you may wish to load any custom routes.

The PageBuilder class has been moved to a separate service provider and gets registered as a shared binding. It’s got a new logger which logs all function calls so you can track if a specific function has been called.  We’ve given developers the ability to create custom PageBuilder functions using a little laravel magic (macroable trait) ie.

WordPress Import

A beta import functionality has been introduced which can import blog posts from WordPress into Coaster, this can be found under “System Settings” then “Import Tools”.

Please be aware this is in early beta and is currently quite dependent on template names being the same as the ones in Coaster2016 & Coaster2017 themes.

Get building!

We think these improvements really add to Coaster’s flexibility and although they may appear failry minor at first glance, they actually set the foundations for some great features to come. Alongside, these “under the hood changes” the new theme looks pretty great!