<
Neerav Mehta
Founder & CEO
A sub theme will inherit:
A sub-theme will not inherit:
Theme Directory: Create a directory in your custom theme directory in the same way you create a theme. Give it a name. For example: mysubtheme.
.info file: Create an .info file in the directory mysubtheme as similar to the parent theme. The only difference will be the following line:
base theme = theme_name
Logo: Add the logo in the sub-theme directory.
Screenshot: Theme screenshot is inherited from the base’s theme. To override the same, just create a new screenshot.png in the sub theme directory.
Style Sheets: You must declare at least one stylesheet in your sub-theme for any of the parent theme's stylesheets to be inherited. To override any particular css file (for instance, style.css), add the following line in your .info file and add a new css file with the same name in your sub-theme’s directory.
stylesheets[all][] = style.css
Javascripts: All the js files defined in the parent theme will be inherited. To override any particular js file, add the following line in your .info file and add a new js file (for instance, script.js), with the same name in your sub-theme’s directory.
scripts[] = script.js
Regions: You can declare a new set of regions in the sub-theme. To inherit the custom regions of the parent theme, the regions should be copied in the sub-theme’s .info file.
Template Files: You can add any template files in your sub theme. If the template file is found in your sub-theme’s directory, then Drupal will override the parent’s template files. Otherwise, it will use the parent’s template files.
Images: The images used in the theme can also be copied in the sub theme directory. If the image is found in your sub-theme’s directory then Drupal will override the parent theme’s image with the same name. Otherwise, it will use the parent’s image.
Neerav Mehta
Neerav Mehta is the Founder & CEO of Red Crackle. With sterling qualities, Neerav’s technological acumen is firing a generation of progressive companies on the digital path. With an undergraduate degree in Electrical Engineering from India's most prestigious institution IIT Bombay and having spent seven years developing and contributing to the launch of AMD's innovative line of computer products, Neerav founded Red Crackle where he is lauded for his dynamic and innovative genius.
Let’s get you started!