Making a Theme Configurable
In this chapter, we’ll talk about configurations.
Suppose we’re developing a theme for a single website. In that case, we probably don’t need to make it configurable, but if we plan to reuse it or use it as a base theme, adding some configurations can improve the reusability of the theme itself.
First of all, we will learn how to define configurations and how to use them. Then, we’ll discover how sub-theming works in Drupal and how configurations are inherited from a parent theme.
The topics covered in this chapter are as follows:
- Creating a theme settings form
- Using theme settings in Twig and JavaScript
- Sub-theming