A Beginners Guide to Drupal Sub-themes
If you are using a Drupal theme from Drupal.org, the best way to make changes to the code is by using a sub-theme.
Using a sub-theme means you can safely update the underlying theme without losing any of your changes.
These two videos are a beginners guide to creating and using a sub-theme.
These videos are part of our complete class on Drupal theming.
Creating your first sub-theme
This video shows you how to create a sub-theme using Bartik, the default theme with Drupal 7. At the bottom of this tutorial, you’ll see the contents of the .info file.
{snippet drupalsubthemesvideo1}
Sub-themes with AdaptiveTheme
This video shows you how to create a sub-theme using AdaptiveTheme which is a very popular base theme.
{snippet drupalsubthemesvideo2}
The .info file for a Bartik sub-theme
name = MyBartik description = A subtheme of Bartik core = 7.x base theme = bartik stylesheets[all][] = css/mybartik.css regions[header] = Header regions[help] = Help regions[page_top] = Page top regions[page_bottom] = Page bottom regions[highlighted] = Highlighted regions[featured] = Featured regions[content] = Content regions[sidebar_first] = Sidebar first regions[sidebar_second] = Sidebar second regions[triptych_first] = Triptych first regions[triptych_middle] = Triptych middle regions[triptych_last] = Triptych last regions[footer_firstcolumn] = Footer first column regions[footer_secondcolumn] = Footer second column regions[footer_thirdcolumn] = Footer third column regions[footer_fourthcolumn] = Footer fourth column regions[footer] = Footer