Example Theme Directory Structure
As previously mentioned, when you first install Mura, if a theme does not exist, Mura will attempt to download one for you based on the "defaultthemeurl
" setting found in the {context}/config/settings.ini.cfm
file. As of version 7.1, this setting defaults to "https://github.com/blueriver/MuraBootstrap4".
Using the MuraBootstrap4 theme as an example, the table below details the directories and files Mura automatically scans for, and those are identified with an asterisk (*) within the "Required" column. As you'll see below, the "templates" directory is the only one that's truly required.
Directory or File | Required | Description |
---|---|---|
../{ThemeName}/assets/ | No | Typically, various front-end framework and library files, are stored here. For example, "bootstrap" and "font-awesome" directories can be found in the MuraBootstrap4 theme. |
../{ThemeName}/content_types/ | No* | This directory, and its purpose is beyond the scope of this guide. Please visit the Mura Developer Guide for details. |
../{ThemeName}/css/ | No* | If an "editor.css " file is located, its styles will be included with CKEditor's styles for any HTML Editor type regions when editing content via Mura's user interface. |
../{ThemeName}/modules/ | No* | This directory, and its purpose is beyond the scope of this guide. Please visit the Mura Developer Guide for details. |
../{ThemeName}/images/ | No | Theme-specific images are typically stored here. |
../{ThemeName}/js/ | No* | This directory is used for storing theme-specific JavaScript files. In addition, Mura checks for an "editor " directory. If found, Mura then scans for some additional directories and files for customizing the web editor. Additional information can be found under the Customizing the Web Editor section. |
../{ThemeName}/resource_bundles/ | No* | As discuss in The "resource_bundles" Directory section, Mura offers a way to internationalize both the user interface, as well as parts of your theme. More information resource bundles, including how to customize and create your own key-value pairs, is covered in the Mura Developer Guide. |
../{ThemeName}/templates/ | Yes | This is technically, the only "required" directory. This is where you create and manage your theme-specific layout templates. See Theme Layout Templates for more information. |
../{ThemeName}/.gitignore | No | The Mura Team uses Git for distributed version control, and this is the site .gitignore file used to specify intentionally untracked files. |
../{ThemeName}/config.xml.cfm | No* | This file contains some theme-specific configuration settings. Visit The Mura Developer Guide to learn more. |
../{ThemeName}/contentRenderer.cfc | No* | This is the theme-specific contentRenderer.cfc. You can add any theme-specific methods here. Visit The Mura Developer Guide to learn more. |
../{ThemeName}/eventHandler.cfc | No* | This is the theme-specific eventHandler.cfc. You can add any theme-specific event handlers/listeners here. Visit The Mura Developer Guide to learn more. |
../{ThemeName}/README.md | No | General information about the theme itself is stored in this file. It is not used by Mura. |
Note: The primary focus of this guide is to help theme developers integrate their existing designs into Mura. The Mura Developer Guide will cover many of the more complex scenarios when it comes to building dynamic display areas, as well as extending the functionality of Mura.