As explained in the introduction to this chapter, subthemes allow developers to customize and extend existing theme installations in a non-destructive manner. They are also handy in keeping the amount of repetitious code to a minimum thereby improving efficiency and easing management.
This recipe details the steps involved in creating a subtheme of an existing theme, which in this case is the core theme, Garland.
Create a folder named mytheme
inside sites/all/themes
. This name is usually also the name of the new theme and it is best to keep things uncomplicated by not using spaces and special characters. While mytheme
is suitable for the purpose of this recipe, it will be a good idea to give the theme a unique and pertinent name based on its design and use. It is also important to ensure that there are no name conflicts with other existing core or contributed themes.