Drupal 6 Themes: Create new themes for your Drupal 6 site with clean layout and powerful CSS styling

Drupal 6 Themes: Create new themes for your Drupal 6 site with clean layout and powerful CSS styling
Authors
Ric Shreves
ISBN
1847195660
Published
30 Sep 2008
Purchase online
amazon.com

In Detail Drupal is an award winning open source Content Management System (CMS). Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is one of the most popular choices for creating a CMS website. Drupal employs a specialized templating system and supports themes, which allow you to change the look and feel of the system's front and back-end interfaces. Drupal 6 Themes is an ideal introduction to theming with Drupal 6.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Yannick Lyn Fatt said
Over the past year and a half I've been doing quite a bit of work with Drupal, a free and open source Content Management System (CMS). Whenever I'm asked how I'm finding Drupal, my answer is usually that, "I have a love hate relationship with it." There is no doubt that Drupal is a very powerful and flexible CMS and more and more companies, universities, communities and individuals are using it. If you don't believe me just look through the various Case Studies and also the list of Drupal sites posted by Drupal's creator and project lead, Dries Buytaert. Most of my frustrations came from the fact that I'm used to having complete control over the markup behind the sites I build. At first I found this not to be the case with Drupal, but as I began to work more and more with it and learn the ins and outs, I started to see how to regain that control.

Enter Drupal 6 Themes by Ric Shreves. This book opened my eyes to some things that I didn't know or understand about theming Drupal. While this book is geared towards Drupal 6, there were quite a few things I was able to learn and apply to Drupal 5 which is the version of Drupal that we are currently using at work (The other option of course would be to buy Drupal 5 themes by the same Author and Publisher). As the book rightly says "Drupal 6 Themes is an ideal introduction to theming with Drupal 6."

The 1st few chapters (1-3) discuss the basics of Drupal theming. I felt these chapters weren't really for me since I was already familiar with the basics. However, it will be very good for person's not familiar with Drupal theming at all. It describes what a theme is, how to add new themes and how to configure those themes. Theme engines are also discussed. Drupal is capable of using a variety of theming engines to build sites, such as Smarty, PHPTal and XTemplate. However, Drupal is distributed with PHPTemplate which relies on good old PHP and which many PHP developers are already familiar with.

Chapters 4-5 then delve into template files, themable functions and how to intercept and override them. This is where you begin to regain control over the markup output by Drupal and it's modules and are able to customize it the way you want it. One of the nice things about Drupal is that there are certain themable functions in the core and in contributed modules that follow a naming convention (ie. `theme_function_name'), which makes it easy for you to identify and override the functionality and output from it's original format. The principles of naming conventions applies to overriding templates as well. For instance one of the template files that is essential to every Drupal theme is the page.tpl.php file. This controls the general layout of the site and does most of the heavy lifting. You could for instance override this and have a different look for your user pages by simply creating a new file called page-user.tpl.php and making adjustments as necessary. You can do a whole lot more, but I'll let you read the book to find out all the juicy details.

Chapter 6, shows you to modify an existing theme, the Zen theme, which prides itself on being flexible and one of the better themes to start with when learning how to create themes in Drupal. Chapters 7-8 continue to build upon and tie everything together. Ric shows you how to create a theme from scratch and have multiple page templates. You will also learn how to control how your theme is displayed based on the type of content, the user viewing it and other factors. Lastly, chapter 9 demonstrates how to theme the various forms generated by the Drupal core. A form I found myself wanting to customize recently was the User Login Block, luckily for me, this was covered in the book and I learnt the different approaches to modifying this and other forms within Drupal.

With all that said, if you're new to theming in Drupal, I definitely recommend this book. Ric did a good job of giving a solid foundation and covering most of what you need to know to comfortably create themes in Drupal.

Antonio R. Tijerino said
I have read most of the book and it is easy to read. The first few chapters are a good review of Drupal and how it works, for me Chapter 6 is where the meat of the book begins.
I would recommend this to anyone wanting to understand more about Drupal theming.

Nathan Smith said
I recently read Drupal 6 Themes, by Ric Shreves - a partner at design and development firm Water&Stone. I found the book to be a great resource.

Drupal 6 Themes Lately I have been digging further into Drupal, an open source content management platform that describes itself lightheartedly as "community plumbing." This plumbing has been used to power many high profile sites, which all have their own distinct look and feel. It appeals to me because it's more powerful than simple blogging software, but with that comes a bit of complexity. Thankfully, it is actually quite intuitive once one makes sense of how it works.

This allows for a great deal of flexibility in terms of design. Looking at sites that use Drupal reads like a veritable who's-who of technology / innovation...

* csail.mit.edu
* fastcompany.com
* infoworld.com
* linuxfoundation.org
* recovery.gov
* research.nokia.com

While some have criticized Drupal in the past as being difficult for designers to customize, and that was probably a valid concern (at the time), the latest version is quite designer friendly - made so via the PHPTemplate engine that is built into the system. While it is "just" PHP, it is quite a bit simpler in terms of building templates than writing out raw code long-hand. So one could say, it is as designer friendly as other systems that rely on PHP for templating.

Shreves did a great job covering all that is possible within Drupal, from a design standpoint. He begins by explaining how the inner workings of the system fit together, and how this allows for a designer to override and tweak everything. He then shows how to take an existing theme and build a sub-theme.

Of course, this is all just a precursor to chapter 7 and beyond, where Shreves really shines, showing you how to build your own fully customized themes. That's not to downplay the importance of the foundational material, as the earlier chapters build well upon each other. I am simply saying I found the chapters on doing your own design from scratch especially inspiring.

Overall, I would highly recommend this book to any code savvy web designers who are looking to take their skills to the next level with a full-fledged content management system. With newly acquired skills, you will be able to confidently tackle enterprise scale projects, building upon the versatility of Drupal.

R. Remy said
Why searching hours on the internet for the answer if it's all in one book?
This book tells you how to theme for drupal 6. I have bought both the book about drupal 5 and 6 and this book is a lot better written then the one for drupal 5 theming. It has helped me a lot with building my second drupal theme (first drupal 6 theme), so I recommend it to everyone new to drupal theming. Of course you need to know how to build sites with html and css, but knowledge about php isn't really required imho.

So just buy it here, or the ebook version from the publishers website like I did, because it will spare you a lot of time for sure.

James Oppenheim said
Drupal 6 Themes from Packt Press by Ric Shreves is a remarkably disappointing book.

Many authors have tackled explaining the programming and configuration of Drupal websites, but this is the first book dedicated to teaching users how to make Drupal 6 look and feel like their own.

Out of the box, Drupal is an amazing website creation package; it has features that would take years to "reinvent" if you tried to work from scratch. From a technical, back-end , programmer's point of view it inspires admiration.

When I put my artistic, designer's hat on, though, Drupal can leave me nearly in tears. Though version 6 radically simplified and improved the design process over the previous edition, learning to skin a dynamically generated Drupal site is still an order of magnitude harder than designing a static web page. Though it is possible, for example, to use Dreamweaver in parts of the Drupal design process, ultimately your snippets of code and css stylesheets are going to need to be channeled to many different locations that on the site that are not readily viewable in a WYSIWYG environment.

In other words, to effectively give a Drupal site a makeover you need to know everything you'd need to do to design a regular website, plus a wealth of information about the "how" and "where" Drupal needs you to follow to get your vision integrated into its content management system. From a technical point of view, the way Drupal gives granular control of the design process without the need to hack the core code is an engineering marvel. Harnessing that power, particularly given the state of the online documentation is challenging.

It is for that reason that, even after working with Drupal for over a year, I looked forward to Ric Shreves Drupal 6 Themes. It is also why I am so profoundly disappointed by this ill-conceived book.
When I first picked up the book there were immediate red flags. In the preface, under the heading "Who is this book for?" the short paragraph that follows doesn't answer that question directly. Is this a book for designers? For programmers? For beginners to Drupal? For intermediates? Instead, the section explains that for a designer to theme in Drupal "a basic knowledge of PHP will be helpful". Frankly, most designers I know don't fit into that category and have little interest in wading through Fundamentals of PHP and MySQL, let alone PHP for Dummies. I think most of them coming to this book are looking for an author to step them through the basics of what they need to bring their vision to fruition in Drupal - even if this means spoon feeding them some basic PHP.

More intermediate users are going to want to know about how to completely revamp the look and feel of Drupal: How do you change the look and feel of the Tabs and Menu systems, for example; the interrelationship between themes, views, and CCK fields, for another. How do you integrate the color picker functions into your own themes? What is the best workflow? What advanced tools are available, and how do you use them? You're not going to find this level of advice here.

Advanced users might want to see a dissection and annotation of the more advanced themes and how they work. The forums at Drupal.org are simply filled with requests of this sort from users who tried to modify some of the included themes only to find them as difficult to navigate uncharted as the Sargasso Sea.

By failing to adequately target a typical reader of the book the author languishes without focus, specificity, or purpose. The first three chapters of the book feel more like a regurgitation of on-line documentation, without adding much new information or clarity : In general terms, how does the theme system work? How do you install a download and install a theme? How do you turn on blocks and modules?
Things begin to break down early in Chapter 3, "Working with Theme Engines". The introduction to the PHPTemplate engine is alright as far as it goes (covering ground already well tilled in virtually every other Drupal book) but it does not concisely take the lesson to the next level with explanations and examples that one would expect in a single topic volume.

Actually, despite the plurality suggested in the chapter heading ("Theme Engines"), the author focuses almost exclusively on the PHPTemplate engine, devoting only two and a half pages to alternatives. Since he gives no examples to contrast the engines and speaks only in generalities, why bother to mention them at all beyond a simple statement such as: "the consideration of alternative theme engines is beyond the scope of this book", an approach he uses elsewhere in the book.

By Chapter 4, "Identifying Templates, Stylesheets, and Themable Functions", I could feel the book go through a schizophrenic shudder, as it abruptly shifted from the "beginners guide" to advanced user's "bible". Forty-five pages are devoted to listing theme elements in Drupal, without explanation or example. At best, this material might have been useful as an appendix, but the leap from "how we turn on an theme" to "provides a div for standardizing indentation" is simply too great. Likewise, this chapter seems to be conceived alphabetically- starting with a description of the theming the "Agregator Module" (try asking most designers what the heck that is) rather than the all important Page.tpl.php file that controls nearly every page on the site. Again, it felt as if this material had been lifted from on-line faqs and documentations and inserted here without much amplification or explanation. Certainly, the tone and manner of the chapter bears nearly no relation to the preceding chapters. Much of it is written in phrases, not even sentences.

Things improve somewhat in the next two chapters. Almost without explanation the technospeak of Chapter 4 is dismissed and the author gives some specific examples of how to modify themes. There is a lot of material missing here: the relationship between Ajax and themes is the most glaring omission. It is hard to imagine a book on theming Drupal that doesn't spend time on formatting "tabs" or "menus", but Shreves avoids these topics. Likewise, there isn't an index entry for theming CCK fields, panels, or views (though they are mentioned in the appendix) - and these modules are considered by many to be nearly indispensible elements in Drupal Site building.

Another glaring omission are third party tools that purport to make theming easier for the beginner. I would include some reference to Artiseer 2, here, perhaps including one of the Artiseer themes, how it works, and how it might be modified.

An appendix to the book entitled "A Themer's Toolkit" encapsulated many of the faults of the book as a whole. Knowing about the Devel Module, for instance, is important. But, knowing how to use it is even more important. The three short paragraphs plus one "tip", barely scratch the surface. Similar, even shorter, blurbs do little more than acknowledge that other modules that would be useful to the theme developer exist. Invariably, these "descriptions" are followed by a weblink where you can learn more. For many readers, the reason we bought this book in the first place was the insufficiency of the on-line material.

So, let me save you some time and money. If you're a beginner, take a look at Using Drupal by Angela Byron, et. al. For more advanced info on Drupal 6 Themes, you can get much of the same information as covered here at the drupal handbook.



You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry