| Drupal

drupal subthemesIf 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.

Sub-themes with AdaptiveTheme

This video shows you how to create a sub-theme using AdaptiveTheme which is a very popular base theme.

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

About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.