Creating a subtheme is the way to go if you need more advanced custom styling and templating for your DXPR Drupal websites! It's as easy as subtheming any other theme, follow these easy steps!
Copy the Starterkit and rename files
- 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..
- Copy this folder to the /themes folder in the root of your Drupal site
- Rename the folder to what you want to call your theme, for example custom_theme
- Inside the custom_theme folder rename the following files:
- glazed_STARTERKIT.info.yml to custom_theme.info.yml
- glazed_STARTERKIT.libraries.yml to custom_theme.libraries.yml
- config/install/glazed_STARTERKIT.settings.yml to custom_theme.settings.yml
- config/schema/glazed_STARTERKIT.schema.yml to custom_theme.schema.yml
- Open the following files and replace every instance of the glazed_STARTERKIT with custom_theme.
- In custom_theme.info.yml update the libraries line at the bottom
- In config/schema/custom_theme.schema.yml update the glazed_STARTERKIT.settings line at the top
- 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 DXPR 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
- We provided an example CSS file in custom_theme/css/glazed_subtheme.css that is loaded globally on your website.
- 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.
- When creating custom template files, please be aware that you are subtheming both DXPR theme and Bootstrap theme, because DXPR theme is a subtheme of the Bootstrap basetheme.