The Definitive Guide to Drupal 7


Create Your First Theme

Taking into account what you have learned so far, create a custom theme.

  1. Start by creating a new folder in sites/all/themes called dgd7.
  2. Inside the dgd7 folder, create a new file named and add the following code inside it:
    1. name = DGD7 Theme
    2. description = A theme written for The Definitive Guide to Drupal 7 book website.
    3. core = 7.x
  3. Grab the screenshot.png file from the chapter source code and copy it into the dgd7 directory. This is an optional step. If the screenshot is not defined, you will see the text “No screenshot” instead.
  4. Now visit admin/appearance and reload the page. You should now see the theme under Disabled Themes. Click the “Enable and set default” link to begin using this theme on your site.

You are reading content from two chapters on Theme Development from The Definitive Guide to Drupal 7, written by Jacine Luisi and published by Apress on July 19, 2011. All rights reserved.