As a general rule, the CWP Team have endeavoured to constrain changes for this theme to CSS and Javascript wherever possible, as opposed to modifying and duplicating the templates. As a cascading theme, all templates in this theme will be applied over the top (with priority) of the CWP Starter theme.

If you need to modify template markup from the SilverStripe framework, other modules or even the Starter theme, you can copy them into the “starter_watea” subtheme directory and modify them there.

Setup

Next, you need to install the required npm packages. You will need to do this both in the CWP Starter theme and in the “starter_watea” subtheme, as this subtheme imports components from the “starter” theme during Sass building. Ensure you have changed each theme’s directory first:

cd themes/starter
npm install
cd ../starter_watea
npm install

Backend changes

This theme and the base-theme also come with the cwp/agency-extensions module which helps us to clean up some parts of the CMS, rename some settings fields and provide a little bit of extra functionality to help the Wātea theme work.

If you need to extend or modify these changes at all, you can control the theme’s extensions with YAML configuration, or create your own extensions in your mysite code.

Compiling assets

Similarly to the CWP Starter theme, you can compile assets using npm commands:

npm run watch # Compiles as "build", then watches for changes and recompiles as necessary

Please note: This subtheme’s compiled Javascript assets are only relevant to this theme, and should be applied on top of the CWP Starter theme’s assets. Ensure that you include them in the correct order.

For CSS, this theme contains a fully compiled set of styles for both themes. You should only include this theme’s CSS (not the CWP Starter theme).

To be able to “npm run build” in the Wātea theme, you will also be required to have run “npm install” in the CWP Starter theme.