Drupal theming for designers

Intended Audience

This article has web designers, developers, and anyone who has http://www.csszengarden.com in their bookmarks, firmly in its sights. We want to bring your fabulous skills to a fabulous web content management platform: Drupal.

Drupal has never suffered from having too many professional designers offering Drupal themes. This shortage has intensified as the use of Drupal has grown. Good looking themes go a long way towards raising Drupal’s profile, and supporting that growth. Take a squiz at our presentation on Drupal theming, and jump into the "great Drupal great themes" postitive feedback loop!

How this article is presented/how to read this article

Sections flagged with a indicate that a your participation is required (e.g. testing a theme, configuring something, etc.)

Sections flagged with a indicate if you’re not sure how to do something, further details are available, but they’re external to this article.

Attachments

Dependencies

It is recommended that you are able jump in to the 'participation required' sections, by:

Drupal Theming – Part 1 - Introduction

How does Drupal enable theming

Drupal uses theme engines, a theme engine is a layer that abstracts functionality between the Drupal core and pluggable Drupal themes. By default, Drupal 5.x installs the Drupal-specific PHPTemplate engine. Other theme engines may be used by installing add-on modules. more on other theme engines


This diagram demonstrates how theme engines plug into Drupal core, and individual themes (i.e. the ones you will create) rely on the theme engines.


In the Drupal-specific PHPTemplate world, the only must-have of a theme is a page.tpl.php file. The other files are not mandatory, and we will look at what they do later.

First, lets inspect page.tpl.php

As you can see, page.tpl.php provides the HTML/XHTML framework for your theme. The highlighted PHP tags are either print, or conditional (if-then-else) print, pre-defined variables (discussed in next section).

Create a new theme by:

  • Creating a folder named ‘simplest_theme_demo’ in /sites/all/themes
  • Downloading the following page.tpl.php into your newly created folder
  • You should have:

Select the theme for your site and look at the code it generates:

By comparing page.tpl.php and the generated code side by side, the extra tags you will need to accommodate in your stylesheet become obvious:

The generated code which has been highlighted in green, indicates sections generated from node.tpl.php. We will discuss node.tpl.php next.

By creating files using the Drupal naming convention, you are able to further control the display of teasers (node.tpl.php), full content (node.tpl.php), comments (comment.tpl.php), and blocks (block.tpl.php), and these will be discussed in the section.

Get stylish

As stated before, all you need to create a Drupal 5.x theme, is page.tpl.php, but as a designer, you're itching to add some style. By dropping a style.css file into you're theme's folder, you're ready to begin theming. For your convenience, we've created a starter theme for you: bare_bones.zip. Edit the bare_bone's style.css, or replace it with you're own.

All themed up and nowhere to go

Some of you will want to show your theme off on your own/your buddy's/your mom's Drupal site. Some will step through the CVS hoops to get it listed on http://drupal.org/project/themes. And for those of you who are excited by an opportunity to expand your premium theme portfolio, stay tuned, exciting things are headed this way!

That's right, we're Drupalling away to make a theme exchange happen!

Drupal theming for designers, continued

Comments

By purchasing these appliances individually as the regular household appliances wear
out, consumers will save money. With this, it is sometimes necessary to replace old parts with new ones in order to keep the equipment working and in good shape.
The storage battery of the sand washer can be
put in order in a dry and antifreezing place. Make sure to
lift the top or door on your washer and run the sponge underneath the entire lid.
A washer unit with a really substantial appeal in phrases of psi can in fact be harmful and
will involve competent application.

https://www.facebook.com/pages/Cyber-Monday-Washer-Dryer- (not verified) | Sat, 11/22/2014 - 03:22 |

An impressive share! I have just forwarded this onto a co-worker who
had been doing a little homework on this. And he in fact
ordered me dinner because I stumbled upon it for him...
lol. So allow me to reword this.... Thank YOU for the meal!!
But yeah, thanks for spending the time to talk about this topic here on your
web page.

Nu Colon Pro Reviews (not verified) | Fri, 11/21/2014 - 22:54 |

Herpes is a common disease that could happen to anybody without even knowing it.
This is a sexually transmitted ailment however this does not provide much of symptoms to give hint that you suffer from Herpes.
Therefore the one and only way to find whether you have Genital Herpes
is to have a check up from your doctor. Research shows that one third of the world population suffered from Herpes at some point of their life and almost
50% of the USA population has got this health
hazard. So, if there are huge amount of Genital Herpes infected
people why is HSV not declared as an epidemic. You might think that if
it had become so common you should see regarding this everyday in newspapers and on television. Well, why that doesn't happen is because Genital Herpes is not regarded as severe as some other STDs like HIV.
So, there is not much talking regarding it though a huge number of population has herpes.
However this doesn't mean herpes has not to be dealt seriously.
Genital Herpes in some cases could lead to other big dieases such as cancer Therefore
you should see a doctor and if you do have Genital
Herpes get it treated.
How to cure herpes

How to cure herpes (not verified) | Fri, 11/21/2014 - 17:00 |

What's up, just wanted to say, I enjoyed this blog post.

It was practical. Keep on posting!

sony tv (not verified) | Wed, 11/19/2014 - 23:58 |

Good resaponse in return off tthis issue with
gennuine arguments andd describing all about that.

Our Site (not verified) | Thu, 11/20/2014 - 23:40 |

The gaming industry has substantially grown over the past
few decades as more individuals take advantage of the entertainment solution these devices provide for the house.
Read the reviews by people who bought the product and not just rely on the website of the.
In this way, regarding sign scope and force utilization,
any headphone with Bluetooth proficience has the ideal blend.
She'll be capable of plug her i - Phone or i - Pod into the console and enjoy
her favorite music. Even if you have a headphone with amazing
sound quality but its very inconvenient to carry around,
you would still be buying a cheaper model but extremely
portable when you are travelling.

Beats By Dre Cyber Monday (not verified) | Wed, 11/19/2014 - 13:55 |

Pretty component of content. I just stumbled upon your blog and in accession capital to claim that I get in fact enjoyed account your
weblog posts. Anyway I will be subscribing for your augment or even I
achievement you get entry to persistently fast.

how to stop ringing in ears (not verified) | Fri, 11/21/2014 - 12:47 |

And to add variation to it Beckham splits that
into a third ponytail up high flowing into the traditional half pony tail.
Marketing professional with more than 10 years of experience in different products & services,
widely networked by which successfully launched and introduced some of the leading brands in India, Consumer durables, Fashion online Products For More Details
:. There are many teens that invent their own styles and aim at becoming an icon among their groups.

bodycon best dresses for curvy women (not verified) | Thu, 11/20/2014 - 18:48 |

If you wish for to increase your know-how just keep visiting
this website and be updated with the hottest news posted here.

onlineaccounting.jigsy.com (not verified) | Wed, 11/19/2014 - 02:27 |

American Journal of Physiology-Regulatory, Integrative and Comparative Physiology recently published a report that
connects hypertension and obesity. The reason is that HCG is approved
for clinical use. These picnic spots and weekend gateways are spread along the borders ofthe city.

hcg weight loss houston (not verified) | Thu, 11/20/2014 - 23:21 |

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options