Drupal 5 Themes and over 1.5 million other books are available for Amazon Kindle . Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
Buy Used
Used - Good See details
Price: £2.80

or
 
   
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Colour:
Image not available

 
Start reading Drupal 5 Themes on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Drupal 5 Themes: Create a new theme for your Drupal website with a clean layout and powerful CSS styling [Paperback]

Ric Shreves

Price: £24.99 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon. Gift-wrap available.
Want it Friday, 21 June? Choose Express delivery at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition £15.44  
Paperback £24.99  
Amazon.co.uk Trade-In Store
Did you know you can trade in your old books for an Amazon.co.uk Gift Card to spend on the things you want? Visit the Books Trade-In Store for more details. Special Offer until June 30, 2013: Receive an additional £5 promotional Gift Certificate, when you trade-in at least £10 worth of books. Learn more.
There is a newer edition of this item:
Drupal 6 Themes Drupal 6 Themes 4.5 out of 5 stars (2)
£24.99
In stock.

Book Description

31 Dec 2007
This book is the ideal introduction to theming with Drupal 5. If you want to create a striking new look for your Drupal website, this book is for you. Starting from the basics of theme setup and configuration, you will learn about the Drupal theming architecture and the PHPTemplate engine, and then move on to modifying existing themes and building new themes from scratch. Included is a complete guide to the various style sheets and themeable functions in Drupal 5, making this book a valuable resource to even experienced theme developers.

Product details


More About the Author

Discover books, learn about writers, and more.

Product Description

About the Author

Ric Shreves is a partner in water&stone, a web development company that specializes in open source content management systems. He works primarily as a consultant and business systems analyst is currently on extended assignment with Peace Dividend Trust. He lives in Bali with his wife Nalisa, one dog, two cats, three turtles and a mind-boggling number of fish. First and foremost, I thank my loving wife Nalisa for her support and patience. It would also be remiss of me to fail to acknowledge my friend (and editor at ComputerWorld) Stefan Hammond, who provides more than a modicum of support and encouragement -- together with much-needed reality checks.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Customer Reviews

There are no customer reviews yet on Amazon.co.uk.
5 star
4 star
3 star
2 star
1 star
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.1 out of 5 stars  14 reviews
15 of 15 people found the following review helpful
3.0 out of 5 stars A good introduction, but poorly structured and printed 5 Feb 2008
By James Stewart - Published on Amazon.com
Format:Paperback
Aimed at those with a knowledge of HTML and CSS but with no prior experience of programming, Drupal 5 Themes sets out to show you how you can quickly and easily get a drupal site up and running with a highly customised look and feel.

Drupal is highly themeable, with most aspects of the user interface being accessible purely in the theme layer without needing to dip into module development or the CMS' core. The book takes the user through the various theme hooks and introduces the simple PHP code needed to override them, add new `regions' (in which blocks can be displayed), customise existing themes and create your own (almost) from scratch. The primary focus is on the default theme engine, PHPTemplate, but others are referenced and a little time is spent on the options for building your own theme using raw PHP (without the extra layer of a theme engine).

For the most part the content is straightforward, and the reader should quickly get a feel for the naming conventions that drive the PHPTemplate approach. While not much programming knowledge is needed, it would be helpful for the reader to have a basic grasp of PHP and introductory programming constructs such as loops and conditionals. I was also surprised to find recommendations to name functions phptemplate_* within theme-specific template.php files, where they could instead be prefixed with the theme's name rather than `phptemplate'. PHP's not fond of functions that share names within the same context, and it is best to give those functions the most specific name available to you in order to avoid errors.

Given the fact that only HTML and CSS are listed as pre-requisites I was a little surprised that the PHP code wasn't introduced in a more focussed section. Given its simplicity it's to be hoped that anyone intending to spend much time building drupal sites would be able to figure it out, but while time is spent picking apart example code little time is spent actually giving a conceptual introduction or, for that matter, on explaining how to install drupal in the first place. Surprisingly, space was given to explaining how cascades work in CSS, which you would think is a fundamental part of a knowledge of CSS and unnecessary in this context.

This is the second book in a row that Packt has sent me for review where it has seemed that reference material is scattered too freely amongst the tutorial-style chapters. Significant chunks of space are given over to listing off functions, the locations of stylesheets, and so on, which is useful information but breaks up the flow of the book unhelpfully. It's surprising that that content wasn't moved to an appendix or, as with their jQuery books, a separate volume. Sitting in the middle of the book it feels like unnecessary filler (just one or two examples would do, along with a reference to an appendix, other volume, or online source) and the space could helpfully be given to more detailed tutorial material. That coupled with poor print quality and light paper stock (both also an issue with that previous book) gives the book a lightweight feel and reinforce its weaknesses.

This book should get an HTML/CSS developer who's not afraid to dip their toes into some PHP up to speed with customising a drupal site, and its worth considering if you've been mostly building static sites or customising wordpress and need a content management system with a wider range of features. Unfortunately it's still fairly weak structurally, and you may well find yourself needing to combine it with quite a bit of online documentation to properly cover the topics under discussion.

Disclaimer: I was sent a copy of this book for review by the publisher.
8 of 8 people found the following review helpful
5.0 out of 5 stars A must for all new Drupal designers! 20 Jan 2008
By Alan Doucette - Published on Amazon.com
Format:Paperback
If you are a designer wanting to learn Drupal, this book is for you. It is written by a designer so there are no programming sections full of code. It shows you how you can customize Drupal's HTML and CSS in detail. The book has a good amount of screen shots, charts, and other visual aids that really help the right side of the brain.

The first 2 chapters are great setup chapters, so if you are new to Drupal they help you get started by telling many of the things designers need to know. There were several "ah ha" moments where concepts finally clicked because of the author's descriptions and examples.

This is also a great reference book. It lists all the CSS files and theme functions that come in Drupal core with a short sentence on their content or purpose. There is an appendix that charts out all the Drupal core CSS files giving you a visual lookup of all ID's and classes for each CSS file.

As I am not new to Drupal the organization was a little strange at first. Topics like overriding template files is covered a few times in first half with little detail. But after finishing the book the organization is more clear. The author spends time going over all the areas of Drupal theming to give you a good background then spends a few chapters modding an existing template and creating one from scratch where he goes into more detail.

The last chapter covers Drupal forms which could do with a book of their own almost. But the author covered a lot of good material to get you started.

"Drupal 5 Theming" doesn't cover CCK or Views theming. CCK and Views are contributed modules that almost every Drupal 5 site uses. It also doesn't cover any advanced theming topics. Which makes this book GREAT for the Druapl beginner, GOOD for intermediates, and FAIR for advanced themers.

Also with Drupal 6 almost here, if you are worried this book will be out of date, don't. There are several theming advances in D6 but the background and understanding this book gives you still applies. Plus D5 is here for the foreseeable future so if you are working on a project now, it will make your job a lot easier.
6 of 6 people found the following review helpful
4.0 out of 5 stars Still useful with Drupal 6, provided that... 14 Mar 2008
By R. Hill - Published on Amazon.com
Format:Paperback
A first release candidate of Drupal 6 was made available on December 20 of 2007, that is, 2 days prior to the publication of this theming guide, which covers Drupal 5. Drupal 6.1 has since been released, and many of Drupal's most popular add-on modules are now ready for use on production web sites. The author mentioned on his blog that an updated version of his book will be published, but Packt Publishing is not yet listing 'Drupal 6 Themes' among its upcoming publications. Still, I read the book, and worked through its examples on a Drupal 6 install. As a somewhat seasoned Drupal developer, I still found the book helpful. I highly recommend it, provided that as you read along you refer yourself to the concise (and well-put-together) Drupal 6 theming guide available on Drupal.org. Theming has definitely taken a leap forward in D6. For instance, intercepting and overriding theming functions is a lot easier now.

What this book covers:

Chapter 1 ("The Elements of a Drupal Theme") presents the theming terminology used in Drupal, and that hasn't changed in Drupal 6.

Chapter 2 explains how to set up and configure a theme in Drupal through the admin interface. By way of example, we download the theme Gagarin from Drupal.org and install it. We also configure 'Garland', which still is the default theme shipped with Drupal. Surprisingly, I learnt quite a handful of tricks in this chapter. All of it is applicable to Drupal 6; even the neat PHP snippets used for the content & visibility of custom 'blocks' work as is. For fun, I ported the Gagarin theme to Drupal 6 in less than 10 minutes, using a porting guide put together by Wesley Tanaka. Your milage may vary (you may do it faster than I).

Chapter 3 explains how the PHPTemplate 'engine' works. Wordy as it is, the definition of a theming engine remains somewhat ambiguous. You may download this chapter from the publisher's web site. Take note that the default PHPTemplate 'template' files have been moved to their respective core module folder in Drupal 6. For example, you'll find the default page.tpl.php file under /modules/system, and node.tpl.php under modules/node.

Chapter 4 is a reference guide to stylesheets and themable (ie:overridable) functions. Only a brief description (ie: one sentence) is provided for each function. The author gives us a snippet of PHP code that produces a list of the theming functions used on the page, but it's somewhat useless because with it we don't know which function produces what markup. In Drupal 6, a neat & "sexy" add-on module, part of the 'Devel' kit of modules, tells us which function to override (and so much more): by Firebug-style point-and-click, we select the DOM element we wish to theme, and we learn how to do so through a 'tool tip'.

Chapter 5 presents different ways to intercept & override themable functions. In Drupal 6, one of these ways has been simplified, that of "placing overrides in dedicated [template] files" for which no default file exists. One no longer needs to tell the theming engine about the presence of the template file, as we used to inside template.php. In the instance where we want additional variables to become available inside the template, we use the new Drupal 6 function themeEngineName_preprocess_hook.

In Drupal 6, adding stylesheets (besides the default style.css) is as easy as adding a few lines in a new 'info' file for the theme. Same with creating new regions on the page : the theme.info file takes care of that. (For these, one needs not add any PHP code to template.php.)

In chapter 6, we modify a theme, 'Zen'. Be warned : even the drupal-5 version of this theme has undergone significant change since the publication of the book.

In chapter 7, we learn how to create a theme from scratch -- and so much more (this chapter definitely should have been broken down). We're finally presented with a list of the variables available in each template file. In Drupal 6, many variables have been renamed (for example, $sidebar_left has become... $left), and new handy ones have been created which are available in all templates, for exampe $logged_in and $is_admin. Note that we should use the new D6 variable $body classes to apply dynamic CSS styling, instead of the ol' $layout (still available).

In chapter 8, we learn how to theme forms. I had to do some research to find how to apply the author's solutions within Drupal 6. Some change is trivial, for example the handy hook_ form_alter function has different parameters passed to it in D6, and one only needs to change the function's 'prototype', ie:

From that in D5 : function modName_form_alter($form_id, &$form){

To this in D6 : function modName_form_alter(&$form, $form_state, $form_id){

In D6, some form-theming solutions are easier to implement... or more difficult: I still haven't figured how to use images for the forms submit button. However, imo, a CSS solution is preferred in Drupal 5 _and_ 6.

What this book does not cover, and I wish it did:

- How to use jquery, the wondrous javascript library shipped with Drupal (there is no mention of it, really).

- How to produce a theme with a configurable color scheme, using the Color Module. A simple tutorial where we create a theme for which we can change the color of the header and/or links through the 'setttings' UI would have been awesome.

- Related to the last point, we're not shown how to modify the theme's settings page - to add to it.

- How to theme 'Views' pages, and nodes created with the Content Construction Kit (CCK).

- How to commit a theme to Drupal.org CVS (using a freeware utility like TortoiseCVS, for example).

This book is particulary successful at breaking down information into bits and steps. It's extremely well-written, quite technical and in-depth, and provides a handful of screen captures in most places. We can theme it _all_ in Drupal, and the author drives that point home.

Where the book somewhat falls short in its delivery:

- Although the author comes from a 'design background' (so it says in the book's preface), he fails to inspire. The theme created from srcatch is particularly unappealing.

- When it comes to designing Drupal themes, we're faced with basically copying and pasting CSS rules scattered throughout a set of *.txt source files to one stylesheet.

To be fair, this is not a book on CSS, nor web design.
Were these reviews helpful?   Let us know

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!

Create a Listmania! list

Look for similar items by category


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges