Support Center

How to create a sub-theme of one of our Drupal 8 Themes

Last Updated: Mar 07, 2018 05:07PM EET
While the official Drupal 8 sub-theme guide can be followed to create a sub-theme of any of our Drupal 8 themes there a few extra steps required so that your sub-theme is fully functional.

First of all start with the instructions of the official Drupal 8 sub-theme guide so that you have the basic files and file structure of the sub-theme.

Our Drupal 8 themes use theme settings in order to configure different elements in the theme. These are theme specific and can not be inherited as they are values stored in the Database.

In order to initialize those for your theme you should copy the [theme_name]/config/install/[theme_name].settings.yml file of the base-theme and place it in the corresponding folder of your sub-theme. You should also rename it so that the [theme_name] matches your sub-theme machine name.

These values are stored in the Database during the theme install process. If you have installed your sub-theme and then added these files you should uninstall and reinstall so that these settings are passed to the database.

Finally in order to be able to configure these values through the theme settings of your sub-theme, you should copy over the theme-settings.php file of the base theme,  edit it and replace all instances of the base-theme machine name to your sub-theme machine name.

After that your sub-theme should be ready to use and modify to your liking.

Contact Us

[email protected]
http://assets3.desk.com/
false
morethanthemes
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete