Themes

Last modified: December 26, 2007 - 16:58

You enable a theme at Administer>>Site building>>Themes

If it has never been enabled on this site, you will have to check the "enable" box and then click the "Save configuration" button at the bottom.

To set up how the theme works, click on the "Configure" link (not the tab at the top).

Fill in the fields.

Save the configuration.

Don't leave the page yet.

Logo and Favorite Icon

Now use that "Configure" tab

I prefer to do this part under the "Global Settings" but it can be done theme-by-theme if you prefer.

The "Default Logo" is that little picture (usually) in the upper left corner of the page. For example, on the "Bluemarine" theme, it's the Drupal logo.

If you want to change it, here's how:

  1. First, find out what size it is because you'll want your own logo to be about the same. (If you are comfortable with HTML and CSS you can also edit the theme's code to accommodate your logo rather than resizing the image. How to edit theme code is not covered in this beginner's guide.)
  2. Theme Name Width Height
    Bluemarine 48 55
    Chameleon 49 57
    Garland 64 73
    Minelli 64 73
    Pushbutton 144 63
    Fancy 80 80
  3. Under "Logo image settings" either type in the path to your logo, or upload it from your PC.
  4. Note: Neither one of those options turns off the "Use default logo" check box. You must select the correct check box yourself.
  5. The "Shortcut icon" (a.k.a. the favorite icon, or "favicon.ico") is the same way. If you want to change this, you must specifically say, "Hey, Drupal, I'm changing this."

Now you click the "Save configuration" button. If you did this in "Global settings" it affects all themes (assuming they behave properly); if you did it for a single theme, then only that theme is changed.

For a list of all available themes, check Themes.

HINT: Going to make a few (or a lot) of changes to a standard theme? Think about copying it over to your /sites/sitename/themes/ folder and renaming it. Then you can do anything you want and still be able to undo it easily by recopying. If the changes ae a bit bigger, think about contributing it back to the community (with your name, of course).

 

See this before Renaming!

romanse - May 6, 2009 - 22:06

I am on my very first Themes lesson here. But! above is very confusing regarding copies to sitename/themes folders. I have tried this. BAD advice, I am sure. Be aware the themes names in admin/build/themes do not change when you rename themes folders. And I find no changes within the themes folders from changes setting at sitename/admin/build/themes/settings/theme-name. That is, I can delete the copied and site specifically placed themes folders and replace back copies of totally original folders and the themes are still as edited! BEWARE... change the folder names back to the renamed names if your website DISAPPEARS! I did this a few times experimenting. When the site then reappears, you can change to any other theme as default hopefully and then you also regain access to the problem theme after you name that folder back to the original.

At least with the core default themes, leave them be!!! I will soon enough try contributed additions placed within the sites/sitename/themes or sites/all/themes folders as appropriate!!
--please, anyone, reply to this..I could use some feedback here. This is very misleading above. Not enough and/or bad advice ..ONLY regarding the folder renaming.

the Portal

Well...

NancyDru - May 6, 2009 - 23:56

Did you notice copying it over to your /sites/sitename/themes/ folder and renaming it. I've never had a problem with this.

Maybe OK for custom/contributed themes

romanse - May 12, 2009 - 02:37

Thank you for the reply Nancy. I say, I am getting on ok in my first few days with drupal and it is largely by following your helpful guide pages.
Is it possible that you have in mind contributed themes and not core themes regarding the suggestion on copying themes to site folders with new names for experimenting/editing?

the Portal

No

NancyDru - May 12, 2009 - 03:28

I have also copied core themes over, but they do need to be renamed. I have done that on multi-sites where I need to alter a template on one site but not the others. It has always worked okay for me.

Renaming details

MarkE - October 7, 2009 - 17:17

What specifically does renaming mean ?

The following worked for me, but no idea if these steps are strictly necessary:

  • Copied garland from drupal/themes/garland to drupal/sites/all/themes/foo i.e. renamed copy of garland folder to foo.
  • Renamed drupal/sites/all/themes/foo/garland.info to drupal/sites/all/themes/foo/foo.info
  • Edited drupal/sites/all/themes/foo/foo.info to change Name to Foo
  • Also edited description though clearly that's not a requirement, just helpful.
  • Refreshed the Administer/Site building/Themes page

Before renaming and editing the themes page just copying got me one garland page.
Editing the info file in the copied directory without renaming it replaced garland with Foo.

Hope that helps.

=-=

VeryMisunderstood - October 7, 2009 - 17:34

This was written for D5 and at that time one simply had to rename the theme folder. D6 changed that to the method you have above.

Color

MarkE - October 7, 2009 - 17:28

Kinda obvious, but to change a theme's color, you'll need to enable the core Color module.

See Theming without code

=-=

VeryMisunderstood - October 7, 2009 - 17:34

to change garland maybe, but not all themes use color module and thus many themes require the altering of css.

 
 

Drupal is a registered trademark of Dries Buytaert.