Customizing the Default Theme in Drupal

Exclusive offer: get 50% off this eBook here
Selling Online with Drupal e-Commerce

Selling Online with Drupal e-Commerce — Save 50%

Walk through the creation of an online store with Drupal's e-Commerce module

$23.99    $12.00
by Michael Peacock | April 2008 | Drupal e-Commerce Open Source

You have a Drupal website and an online store; your product catalog is online and you have set up customer and staff users on the site; the only complaint so far is how the website looks. You like the default design, but do not think it is appropriate for your site or your store; you want something more tailored to your business.

In this article by Michael Peacock we will learn how to customize the default theme in Drupal.

Let's look at the default theme (garland) and customize it.

We can customize the following features:

  • Color scheme, either based on a color set, or by changing the individual colors
  • If certain elements, such as the logo, are displayed
  • The logo
  • The favicon

Back in the Themes section of the Administer area, there is a configure link next to each theme; if we click this we are taken to the theme's configuration page.

Customizing the Default Theme in Drupal

Although Doug ideally wants a new theme that is unique to his website, he also wants to have a look at a few different options for the default theme. In particular, he wants to add his company's logo to the website and try a number of red color schemes as those are his corporate colors.

Color Scheme

The color scheme settings are quite intuitive and easy to change. We can either:

  • Select a color set
  • Change each color by entering the hexadecimal color codes (the # followed by 6 characters)
  • Select the colors from the color wheel

Customizing the Default Theme in Drupal

To change a color using the color wheel, we need to click on the color type (base color, link color, etc.) to select it and then chose the general color from the wheel and the shade of the color from the square within.

When we change the colors or color set, the preview window below the settings automatically updates to reflect the color change.

The following color sets are available:

  • Blue Lagoon (the default set)
  • Ash
  • Aquamarine
  • Belgian Chocolate
  • Bluemarine
  • Citrus Blast
  • Cold Day
  • Greenbeam
  • Meditarrano
  • Mercury
  • Nocturnal
  • Olivia
  • Pink Plastic
  • Shiny Tomato
  • Teal Top
  • Custom

Quite a number of these are red-based color schemes, let's look into them, they are:

  • Belgian Chocolate
  • Meditarrano
  • Shiny Tomato

Belgian Chocolate Color Set

The Belgian Chocolate color set uses a dark red header with a gradient starting with black flowing into a dark red color. The page's background is a cream color and the main content area has a white background as illustrated by the picture below:

Customizing the Default Theme in Drupal

Mediterrano Color Set

The Mediterrano color set uses a lighter red color where the gradient in the header starts with a light orange color which then flows into a light red color. Similar to the Belgian Chocolate color scheme the background is cream in color with a white background for the content area.

Customizing the Default Theme in Drupal

Shiny Tomato Color Set

The Shiny Tomato color set has a gradient header that starts with deep red and flows into a bright red color. The page's background is light grey with white background for the main content area, reflecting a professional image.

Customizing the Default Theme in Drupal

The Shiny Tomato color set uses a red scheme which is in Doug's logo and he feels this set is the most professional of the three and wants us to use that.

 

Selling Online with Drupal e-Commerce Walk through the creation of an online store with Drupal's e-Commerce module
Published: April 2008
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

Toggle Display

With the toggle display options, we can select the elements we wish to display on our site, these include:

  • Logo
  • Site name
  • Site slogan
  • Mission statement
  • User pictures in posts
  • User pictures in comments
  • Search box
  • Shortcut icon

By default Site Slogan, User pictures in posts, User pictures in comments, and Search box are disabled, the rest are already enabled. Unfortunately with this theme we can only enable the Site Slogan; the other three options cannot be enabled with our choice of theme.

Doug initially wanted the slogan to be enabled; however, because of the length of his slogan, users with a small screen would not see the website name or the slogan:

Customizing the Default Theme in Drupal

The slogan and site name will only be displayed if we have a larger screen as illustrated below:

Customizing the Default Theme in Drupal

Because of this problem, Doug decided it was not worth leaving the option enabled!

Logo Image Settings

As Doug also wants his logo to go into the website, we need to uncheck the option for using the default logo and select the logo file to upload.

Customizing the Default Theme in Drupal

Once the logo has been uploaded, the website's header immediately updates to include the logo we have just uploaded, as shown below:

Customizing the Default Theme in Drupal

Shortcut Icon Settings

The final option for customizing the sites theme is the Shortcut icon settings. The shortcut icon is the favicon displayed in the address bar of our browser next to the web address. By default, this is a small version of the Drupal logo.

Let's customize this to a small version of Doug's logo. Graphics editing programs have little provisions for creating icon files, so let's use a web-based tool to turn the logo into a favicon. We can use http://www.htmlkit.com/services/favicon/, which is a popular online favicon generator.

On this website we can upload our logo:

Customizing the Default Theme in Drupal

Once the image has been uploaded, a preview of the icon is displayed on the site and we can download a copy of it.

Customizing the Default Theme in Drupal

Now that we have our favicon generated and downloaded, we can upload it to our website:

Customizing the Default Theme in Drupal

Once this is uploaded our favicon updates automatically, as shown below:

Customizing the Default Theme in Drupal

The Customized Skin

These changes leave us with a skin that looks like this:

Customizing the Default Theme in Drupal

Doug is really pleased with these changes, and thinks it is a massive improvement on the default theme.

Summary

We have just seen how to customize the default theme in Drupal. It's just one of the many ways in which we can manipulate themes in Drupal.

Selling Online with Drupal e-Commerce Walk through the creation of an online store with Drupal's e-Commerce module
Published: April 2008
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

About the Author :


Michael Peacock

Michael Peacock is a web developer from Newcastle, UK and has a degree in Software Engineering from the University of Durham. After meeting his business partner at Durham, he co-founded Peacock Carter, a Newcastle based creative consultancy specializing in web design, web development and corporate identity.

Michael loves working on web related projects. When he is not working on client projects, he is often tinkering with a web app of his own.

He has been involved with a number of books, having written two books himself (and working on his third): Selling online with Drupal e-Commerce Packt, and Building websites with TYPO3 Packt. He has also done technical reviews of two other books: Mobile Web Development Packt, and Drupal Education & E-Learning Packt.

You can follow Michael on Twitter.

Contact Michael Peacock

Books From Packt

Mastering phpMyAdmin 2.11 for Effective MySQL Management
Mastering phpMyAdmin 2.11 for Effective MySQL Management

Building Powerful and Robust Websites with Drupal 6
Building Powerful and Robust Websites with Drupal 6

Learning Drupal 6 Module Development
Learning Drupal 6 Module Development

Building Websites with Joomla! 1.5
Building Websites with Joomla! 1.5

WordPress Complete
WordPress Complete

OpenCms 7 Development
OpenCms 7 Development

WordPress Theme Design
WordPress Theme Design

Drupal 5 Themes
Drupal 5 Themes

 


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
k
h
a
m
g
E
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software