Expert Insights into Mura's Flexible Theme Architecture
October 17, 2018
As the internet at large continues to shift towards content-as-a-service, separating the design layer even further from the actual content, Mura's builders have attempted to get one step ahead of the game.
By detaching the concept of a Mura "theme" from a "site", they have provided some important new global options for customizing core functionality and increasing overall flexibility.
Steve Withington explains the subtle-yet-important improvements in the latest version, highlighted thoroughly when Mura 7.1 was released.
Of particular interest, themes are now universally available, located in a top-level directory of their own, where they can be applied to every site in the Mura instance. Each theme can contain its own assets and methods for overriding core functionality, making it easy to modify multiple sites at once, in ways that are completely update-safe. (It is worth noting, existing Mura sites with traditional themes stored within the site folder will continue to work just fine in 7.1). "Your Mura site folders are going to be very lightweight now", Withington explained, "it is just going to be the site files. That's it."
Of particular interest, themes are now universally available, located in a top-level directory of their own, where they can be applied to every site in the Mura instance.
Along these same lines, Mura's core modules (formerly called "display objects") are now also located in a global directory, with the ability to create global overrides which will be available to all sites, or to customize them on a per-site or per-theme basis.
The new default theme, based on Bootstrap 4, can be replaced by a theme of your own in a dedicated repository, and will be instantly available to any new site you create in Mura
In addition to the global directory and file structure changes, Withington explained, the auto-update process has been streamlined, including options to update from a customized fork of the Mura core. While incremental updates have been more or less removed in favor of less frequent release points, Mura now provides the option to update your core files against your own repository, rather than Blueriver's master codebase.
Similarly, the new default theme, based on Bootstrap 4, can be replaced by a theme of your own in a dedicated repository, and will be instantly available to any new site you create in Mura, allowing for creation of your own "default Mura theme" which can be managed as an independent project.
With this new file structure, there are a few things to be aware of when moving content from any older version of Mura to 7.1, such as the changed locations for sites, themes and modules, and some slight variations to the way Mura generates content URLs for navigation links. The thorough and completely-updated documentation for Mura 7.1 covers these points and more with detailed instructions for upgrading to a new installation, as well as upgrading an existing Mura instance.
The overall focus and intention of this release is on simplification and globalization, creating Flow and reducing friction wherever possible,
The overall focus and intention of this release is on simplification and globalization, creating Flow and reducing friction wherever possible, while maintaining the familiar options for sites built in prior versions. By freeing the theme from the confines of any given site and separating the default Mura theme into an independent project, while allowing the theme itself to modify core functionality, developers are given new freedoms in the way themes are designed, structured and applied. Meanwhile, Mura is furthering the possibilities for "headless" data delivery, where no theme or front end exists at all.
In addition to this new approach towards stateless design and support for universal theme development, Blueriver continues to provide a solid stack of resources for those looking to sharpen their skills. Theme developers of any experience level will benefit greatly from familiarization with Mura's Theme Developer documentation. Attendance at one of Blueriver's live Theme Developer Training sessions is also highly recommended.
More from Blueriver
[Video] Expert Insights: Mura 7.1's Flexible Theme Architecture
In Mura v7.1, a completely new directory structure was introduced, along with other notable changes to Mura's flexible theme architecture.
Learn how you can use "modules" (formerly known as "display objects") to integrate exciting new functionality into your sites, and get expert guidance for upgrading to v7.1 from previous versions in this free, on-demand presentation.