Saturday Workshop: All About Theming
Before you start
Set admin theme to Garland (or something else safe) at admin/settings/admin. This way no matter how your new theme screws up you'll be able to disable or change the theme. However it does mean that in order to see the new theme you'll need to get out of the admin portion of the menu.
Some Alternatives (more detail on items 1-3 below)
- Find one you like as is at themegarden.org/drupal6/
- Acquia provides some very nice themes but these are not available at themegarden so search for them at drupal.org: http://drupal.org/project/themes?text=acquia
- See some example code (.zip rt click and save) generated by artisteer and learn by looking at that!
- Package is $130 for drupal
1. Find one you like
Some thoughts on How to pick a theme
- First go to to the themegarden.org to see lots of themes in action. Be sure to look at themes for Drupal 6 only. Then select a theme name from the side of the page and the whole page is redrawn with that theme.
- In general - pick a theme that is close to what you want, at least in the ways that might be hard to change!
- Header image - generally easy to change, unless the header image blends or continues into page background - then you might have to change both. The relative size of the header might be a little trickier to change
- Columns - many 3 column can be made into 2, but not necessarily the other way around
- Tabs - adding tabs if there are none would be very difficult; changing configuration of tabs might be difficult; if you anticipate using large numbers of tabs some themes will wrap in unattractive ways.
- Floating vs fixed - although this can often be changed, might want to start with one that's the way you want it.
- Whitespace - can be added in css
- Tables vs css - css will be easier to change successfully - you may have to read site notes to figure out which kind of site it is
- Once you find a theme you're drawn to, select the Project theme_name link found under Current Theme in the sidebar. This will take you to the drupal.org page and tell you more about that theme and how it was constructed (css or tables, fixed or floating, etc)
- If you find one you like, go ahead and download it while you're on the drupal page. You can put multiple themes up on your site and try them out there.
- Install the theme (see below)
- Set admin theme to Garland (or something else safe) at admin/settings/admin.
- Enable the new theme at /admin/build/themes and make it the default. Go to the home page by clicking on the top graphic to test the theme.
- To customize the theme, go to admin/build/themes and select the configure button next to the theme you've downloaded
How to install Drupal Themes
Themes are installed just like modules except they are stored in .sites/all/themes instead of .sites/all/modules:
- download to your computer
- upload to the server
- use cPanel to extract
- you should end up with .sites/all/themes/new-theme-name
2. Start with Zen and modify (for self-study)
- Read about it: http://drupal.org/project/zen
- Read more about it: http://drupal.org/node/193318 and follow the getting started instructions
- If you want to customize a different theme...
- Start with admin/build/themes and select the configure button next to the theme you've downloaded
- If you want to modify the code: look at these files for customizing
- drupal/sites/all/themes/xxx for downloaded themes such as zen
- drupal/themes/xxx for default themes such as garland
- Variation on above - investigate the 960 grid system which facilitates complex grid layouts. Very cool!
3. OR... Roll your Own
Start with HTML and CSS and add in php code to turn it into a drupal theme