Creating a subtheme is the way to go if you need more advanced custom styling and templating for your Glazed Drupal websites! It's as easy as subtheming any other theme, follow these easy steps!

Copy the Starterkit and rename files

  1. Find the folder named glazed_STARTERKIT which is inside the glazed theme folder. If you are using one of our demo installation profiles you will find the glazed theme folder in /profiles/cms/glazed inside your website root folder..
  2. Copy this folder to the /themes folder in the root of your Drupal site
  3. Rename the folder to what you want to call your theme, for example custom_theme
  4. Inside the custom_theme folder rename the following files:
    1. glazed_STARTERKIT.info.yml to custom_theme.info.yml
    2. glazed_STARTERKIT.libraries.yml to custom_theme.libraries.yml
    3. config/install/glazed_STARTERKIT.settings.yml to custom_theme.settings.yml
    4. config/schema/glazed_STARTERKIT.schema.yml to custom_theme.schema.yml
  5. Open the following files and replace every instance of the glazed_STARTERKIT with custom_theme
    1. In custom_theme.info.yml update the libraries line at the bottom
    2. In config/schema/custom_theme.schema.yml update the glazed_STARTERKIT.settings line at the top
  6. In custom_theme.info.yml change the name of the theme from THEMETITLE to a title of your choice, for example Custom Theme

If you made it until here you now have a custom theme that inherits all CSS and theme settings of Glazed theme. If you enable your custom theme and visit its theme settings form you can customize the look and feel of your custom theme. 


Adding custom CSS and Templates

  1. We provided an example CSS file in custom_theme/css/glazed_subtheme.css that is loaded globally on your website. 
  2. If you wish to add more CSS files to your theme, or to add Javascript files, follow Drupal's theming documentation about CSS and JS assets.
  3. By default your custom CSS files will not be processed by the color module. If you want your CSS files to be modified when changing the color scheme in the theme settings form, you have to add a path to the file in the 'css' array near the bottom of custom_theme/color/color.inc. For more details about how the Color module works see the color module integration documentation.
  4. When creating custom template files, please be aware that you are subtheming both Glazed theme and Bootstrap theme, because Glazed theme is a subtheme of the Bootstrap basetheme.