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

We are happy to uncover this site about Fat loss Element. I wanted to thanks due to this astounding study!! I totally making the most of just about every petite amount of the idea along with We've you book-marked to test out completely new material you submit.

http://goo.gl/Rzf30R (not verified) | Wed, 08/27/2014 - 22:04 |

This is a great article, Thanks for giving me this information. Keep posting http://www.jeparaonline.org/

Klik Disini (not verified) | Sat, 08/23/2014 - 01:12 |

I've been researching inside world wide web to have a comprehensive post about Fat loss Element. We are therefore pleased to discover everything I wanted, in the following paragraphs. Your rule snippets along with display photographs will for sure help me a whole lot. Thank you a whole lot intended for discussing.

Fat Loss Factor (not verified) | Wed, 08/27/2014 - 15:08 |

I am very happy to find this site about Acne No More. I wanted to thank you for this immense read!! I absolutely enjoying every petite bit of it and I have you bookmarked to test out new substance you post.

Acne No More (not verified) | Tue, 08/26/2014 - 15:47 |

When i could obtain the particulars that we had been seeking. I must thanks a lot for the endeavors you get in writing Candidiasis write-up. We are anticipating the particular comparable greatest initiatives from anyone sometime soon at the same time.

Yeast Infection (not verified) | Mon, 08/25/2014 - 17:25 |

The Challenge Management Commence (PMI) is the leader plus the almost all more popular firm to promote project management best practices. This information identifies your variances involving the CAPM in addition to PMP examinations.

capm (not verified) | Fri, 08/22/2014 - 22:40 |

Hi there, I found your website via Google while searching for a related topic, your website came up, it looks great. I have bookmarked bluehost coupon in my google bookmarks.

official website (not verified) | Tue, 08/19/2014 - 18:54 |

Absolutely pent subject matter, appreciate it intended for not bothered data. I adore the wp structure Ringing in the ears Miraculous, wherever performed an individual get a hold of that?

facebook.com/Phen375Reviewd (not verified) | Fri, 08/22/2014 - 16:34 |

hey there, your site is cheap. We do thank you for work I really like your Tinnitus Miracle. It’s evident that you have a lot knowledge on this topic.

http://goo.gl/NXoQ28 (not verified) | Thu, 08/21/2014 - 20:21 |

Hi there, I found your website via Google while searching for a related topic, your website came up, it looks great.

click this site (not verified) | Thu, 08/21/2014 - 16:55 |

Your determination to be able to moving past the perfect solution is down and up have been unbelievably functional possesses consistently stimulated many people just like Previous Institution New Body to accomplish their desires. <a href="https://www.facebook.com/oldschoolnewbodyreviews">Old School New Body Review</a>

Old School New Body Review (not verified) | Wed, 08/20/2014 - 21:02 |

A person accomplished several good factors generally there. I did so any browse the problem as well as identified the majority of men and women should have the same judgment with your Previous Institution New Body.

Steve Holman Old School New Body (not verified) | Wed, 08/20/2014 - 19:43 |

While visiting Previous Institution New Body, i usually learn an excellent content including your current Very good career on this content! I like the way you displayed your current details as well as the way you got intriguing as well as clear to see. Thank you.

Old School New Body Review (not verified) | Wed, 08/20/2014 - 19:27 |

Previous Institution New Is an exceptionally powerful author. I can observe this kind of with your content. You've got a means of publishing convincing facts in which leads to much curiosity.

Old School New Body Review (not verified) | Wed, 08/20/2014 - 19:25 |

Just wanna remark on few general things, The website style is ideal, the topic matter is rattling good
I simply must tell you that you have written an excellent and unique article that I really enjoyed reading bluehost coupon.
<a href="http://www.bestwebhostingdeal.net">official website</a>

official website (not verified) | Tue, 08/19/2014 - 18:51 |

It’s in point of fact a great and helpful piece of info. I am glad that
you shared this helpful info with us. Jam tangan wanita murah
Thanks for sharing.
http://quinnaksesoris.com/beli-jam-tangan-online-terpercaya/

jam tangan wanita murah (not verified) | Tue, 08/19/2014 - 02:06 |

I found it to be interesting and loaded with unique points of interest. I like to read material that makes me think.Thank you bluehost coupon for writing this great content.

official website (not verified) | Tue, 08/19/2014 - 18:49 |

Honda has been the center of attention for the last few decades mainly due to the innovative models it has been producing. There is a long list of models to the name of Honda but the recent model that has caused the Honda enthusiasts to go wild is the Honda Mugen Civic model which is expected to be released by mid-October 2008.

civicsports (not verified) | Thu, 08/21/2014 - 15:15 |

Dedication is required of any journalist, but it takes a special kind of reporter to film and photograph war zones as they rage uncontrollably. I'm not speaking heroically; my intuition tells me these men and women are driven

ormistoneducation (not verified) | Thu, 08/21/2014 - 15:15 |

Summit has easy access to the Midtown Direct for those of you who commute into New York for work or play and want a good investment at the same time.

creativeeducationsummit (not verified) | Thu, 08/21/2014 - 15:14 |

In choosing the right counselor you will need to think about what you want and what is required by your insurance company (if you are using one) so that you get the highest education and most information.

counselingeducation (not verified) | Thu, 08/21/2014 - 15:14 |

it helps to reach wider audiences and perhaps maximize client base in the process. A very famous entrepreneur Robert Kiyosaki once stated that the rich get where they are because they understand the value of creating strong networks

capitalbusinessnetwork (not verified) | Thu, 08/21/2014 - 15:14 |

omg! can’t imagine how fast time pass, after August, ber months time already and Setempber is the first Christmas season in my place, I really love it! I really got into this bluehost coupon.

official website (not verified) | Tue, 08/19/2014 - 18:48 |

riminal law itself is the situated of adequate breaking points of behavior in the public eye. This is the thing that individuals ought to and ought not do. These are the framework and regulations that everyone in the public eye is anticipated to overview. Criminal law itself does not need that parts of society work any first class acts

criminal law (not verified) | Fri, 08/15/2014 - 21:35 |

The information and the aspect were just wonderful. I think that your viewpoint is deep, it’s just well thought out and truly incredible to see someone who knows how to put these thoughts so well. Good job!

partytent huren almelo (not verified) | Tue, 08/12/2014 - 23:51 |

It’s in point of fact a great and helpful piece of info. I am glad that
you shared this helpful info with us. Please stay us informed like this.
Thanks for sharing.

tas branded (not verified) | Fri, 08/08/2014 - 19:28 |

You should select the spas that offer various ranges of packages, and accommodations. Camp Eden is one such Health Resort that take care of every detail including food, planning, and pampering.

www.health-matrix.org (not verified) | Fri, 08/08/2014 - 16:24 |

http://www.capitalbusinessnetwork.org Home Based Businesses and Network Marketing are two of the hottest trends in the market place today. In order to achieve success in both, a person must have desire, belief and know you deserve to be successful.

capital business net work (not verified) | Thu, 08/21/2014 - 15:16 |

chgvhgvhg

Guest (not verified) | Fri, 08/08/2014 - 14:30 |

I have started drupal theming a few days ago. There are a lot to do.

go ahead with this site (not verified) | Fri, 08/08/2014 - 14:29 |

Nice article. Wonderful article about Internet Slang i should say thanks for your data. Training happens to be a matter. But, remains on the list of primary issues of our period. I anticipate more and enjoy your article. <a href="http://goo.gl/Vw1Yuj">Visit here</a>

Visit here (not verified) | Wed, 08/06/2014 - 19:08 |

Fantastic beat ! I would like to apprentice whilst you amend your site, how can i subscribe
for a weblog web site? The account aided me a applicable deal.
I have been tiny bit familiar of this your broadcast
offered vibrant transparent idea
https://www.smore.com/frejx-bisnis-tiket-pesawat

tiket pesawat online (not verified) | Mon, 08/04/2014 - 17:12 |

I’m fascinated by how well you laid out your material and presented your views. Thank you bluehost coupon.

official website (not verified) | Tue, 08/19/2014 - 18:52 |

Drupal uses theme engines, a theme engine is a layer that abstracts functionality between the Drupal core and pluggable Drupal themes.

Guest (not verified) | Wed, 07/30/2014 - 00:59 |

The article you have posted contains massive message came to be powerful. Howdy, first I must say Internet Slang articles in this blog are very interesting to read. <a href="http://www.internetslangs.net">Visit here</a>

Visit here (not verified) | Wed, 08/06/2014 - 19:05 |

2014, does the above coding still apply?

Guest (not verified) | Wed, 07/23/2014 - 16:22 |

I personally did not saw many developers or designers offering drupal theme i do not know why its happen because drupal is a thing with different features.

john (not verified) | Wed, 09/03/2008 - 18:48 |

Your site is great and I really appreciate it! I have always enjoyed reading your site.

Guest (not verified) | Wed, 09/03/2008 - 15:24 |

Zen is a well supported and documented starting point for Drupal theming, as others have mentioned here. Also, I'm a fan of the <a href="http://drupal.org/project/hunchbaque">Hunchbaque theme</a> for simple stuff.
<a href="http://www.topnotchthemes.com">Premium Drupal themes</a>

Guest | Wed, 07/23/2008 - 04:17 |

Great information. I am just getting into Drupal and theming sites for my <a href="http://www.furociousdesign.com/">Orange County Website Design</a> company, and I'm learning a lot of good things from posts like this. It's great to work with CMS's that are robust and have many options like Drupal does. Keep the great design information coming and I'll stay tuned in. Cheers!

Guest | Sat, 06/21/2008 - 04:25 |

Thanks for putting this together. It might be helpful to others visiting the page to note that if you're using drupal 6.x you need to include a *.info file in the theme directory (e.g: simplest_theme_demo) described above.

There's more info about this here: http://drupal.org/node/171205

I think the simplest *.info file would be something like:

name = Simple
core = 6.x
engine = phptemplate

Guest | Sun, 03/16/2008 - 02:11 |

I've used yellow highlights in the page.tpl.php image to call attention to the PHP variables embedded in the HTML structure. I just discovered this article, written in September '07, that also inspects the anatomy of page.tpl.php in easily chewable chunks: http://www.nerdliness.com/article/2007/09/10/drupal-theming

em | Thu, 12/20/2007 - 13:57 |

Beginner Drupal themers were often pointed to Zen as a starting point, but for a long time, it was a full theme that required a lot of style elimination to get to a realistic starting point. A week after this post was blogged, Zen was updated, and has been freshly minimalist-ized! Now I can agree enthusiastically with other Zen referrers: http://drupal.org/project/zen

em | Thu, 12/06/2007 - 09:23 |

Thanks for sharing Fat Loss Factor Review useable article - I really increase your acquisition.it is really very informatics post for young people, and hope they will enjoy well after reading this post.

click here (not verified) | Tue, 08/05/2014 - 22:13 |

This is a great article, Thanks for giving me this information. Keep posting http://www.jeparaonline.org/

Klik Disini (not verified) | Sat, 08/23/2014 - 01:13 |

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