Adding and Removing Themes
New themes can be registered and unregistered with Jadu Central through the command line. The command line interface provides a simple way to manage Jadu Central themes without needing to manually modify configuration files.
Registering a theme
To add a theme, use the register theme command along with the theme name. This will make the theme available for use in Jadu Central.
- Include the theme bundle in your repository, so that it is present on your server. You could do this by adding the theme repository as a dependency of your site project in
composer.json
. - Once the theme files are on the Jadu Central server, log into the server and run the theme register command.
php cli.php cms:theme-register path/to/theme
php cli.php cms:theme-register path/to/theme --main-site-theme // to specify this is a theme only for the main site
For the main site, after registering the theme you will need to:
- Update
config/frontend/config.yml
, you will need to set the theme value to the theme machine name - Update
config/bundles.xml
, you will need to add the theme bundle to the frontend element
When registering a main site theme, providing the --main-site-option
is not mandatory if the theme.yml
file sets the main-site
attribute to true.
Unregistering a theme
To remove a theme, use the unregister theme command followed by the theme name. This will remove the theme and prevent it from being used going forward.
php cli.php cms:theme-remove NAME
NAME
is the attribute of the name
value in the theme.yml
configuration file.
You will be prompted to confirm if the theme you are attempting to remove is currently assigned to one of your Galaxies sites. We recommend that you only remove themes that are not currently in use.
Theme clean up
Running this command will identify and list any broken themes that are registered on your server, along with their status of whether they are assigned to any Galaxies sites.
php cli.php cms:theme-cleanup
After running the command you will be prompted to confirm clean up actions after the list is shown.