Creating a sub-theme based on a core theme
This recipe details the steps involved in creating a sub-theme of an existing core theme.
Getting ready
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.
How to do it...
A sub-theme of a core theme can be created through the following procedure:
Create a file named
mytheme.info
inside themytheme
folder.Edit this new file and add the following code inside it:
name = Mytheme description = My new sub-theme (CSS, phptemplate, 3-col) base theme = garland core = 6.x engine = phptemplate stylesheets[all][] = mytheme.css
Note
It is useful to add an informative...