Drupal 6 Themes

Ric Shreves

eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$15.59 save 35%!
Print book: $39.99
$35.99 save 10%!
Print + eBook bundle: $63.98
Includes free access to the book on PacktLib
$39.59 save 38%!
Free Shipping! UK, US, Europe and selected countries in Asia.
This book can also be purchased from:
Overview
Table of Contents
The Author
Reviews
Downloads
  • Learn to create new Drupal 6 themes
  • No experience of Drupal theming required
  • Techniques and tools for creating and modifying themes
  • A complete guide to the system's themable elements

Book Details

Language : English
Paperback : 312 pages [ 235mm x 191mm ]
Release Date : September 2008
ISBN : 1847195660
ISBN 13 : 978-1-847195-66-1
Author(s) : Ric Shreves
Topics and Technologies : All Books, Content Management (CMS), Drupal, Open Source


Table of Contents

Preface
Chapter 1: The Elements of a Drupal Theme
Chapter 2: Theme Setup and Configuration
Chapter 3: Working with Theme Engines
Chapter 4: Identifying Templates, Stylesheets, and Themable Functions
Chapter 5: Intercepts and Overrides
Chapter 6: Modifying an Existing Theme
Chapter 7: Building a New Theme
Chapter 8: Dynamic Theming
Chapter 9: Dealing with Forms
Appendix A: Drupal CSS Map
Appendix B: The Themers' Toolkit
Index
  • Chapter 1: The Elements of a Drupal Theme
    • The Importance of Themes in Drupal
      • Theme It in Whole or in Part
      • Build with Blocks
      • Intercept and Override
    • What Is a Theme?
    • What Is a Theme Engine?
    • The Range and Flexibility of Drupal Themes
    • What You See on the Screen
    • The Big Picture: How Drupal Displays a Page
    • The Default Themes of the Drupal Distro
    • The Theme Files
      • The Files of a PHPTemplate Theme
      • The Files of a Pure PHP Theme
    • Summary
  • Chapter 2: Theme Setup and Configuration
    • Finding Additional Themes
    • Installing an Additional Theme
    • Configuring a Theme
      • Theme-Specific Configuration Options
        • Color Picker
        • Enable/Disable Page Elements
        • Logo Settings
        • Shortcut Icon Settings
      • Global Configuration Settings
    • Managing Modules and Blocks
      • The Module Manager
      • The Blocks Manager
        • Configuring Individual Blocks
      • Adding PHP to Blocks
    • Theming in Action: Dressing Up Garland
      • Set the Color Scheme
      • Set Page Elements (Toggle Display Settings)
      • Upload Logo
      • Global Site Information
      • Enable Modules
      • Manage Blocks
      • Add Some Dummy Content and Links
      • Set Access Levels
      • Create a Custom Block
      • Set Block Visibility
    • Uninstalling Themes
    • Summary
  • Chapter 3: Working with Theme Engines
    • What is PHPTemplate?
    • How Does It Work?
    • Getting Started with PHPTemplate
      • The Role of the .info File
      • The Role of the page.tpl.php File
      • Two Contrasting Examples
        • A Basic PHPTemplate Theme—Bluemarine
        • A More Complex PHPTemplate Theme—Garland
    • Alternative Theme Engines
      • PHPTAL
      • Smarty
      • PHP XTemplate
    • Installing Additional Theme Engines
    • Summary
  • Chapter 4: Identifying Templates, Stylesheets, and Themable Functions
    • Putting Together the Pieces—Templates, Stylesheets, and Functions
      • Default Templates and Variables
      • Default Stylesheets
      • The Themable Functions
    • A Guide to Theming Elements
      • Common Theme System Functions
      • Theming the Aggregator Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Block Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Book Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Color Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Comment Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the DBLog Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Filter Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Form Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Forum Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Help Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Locale Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Menu Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Node Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the OpenID Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Pagination Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Poll Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Profile Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Search Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Syslog Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the System Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Taxonomy Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Tracker Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Trigger Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Update Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the Upload Module
        • Default Templates
        • Default Stylesheets
        • Themable Functions
      • Theming the User Functionality
        • Default Templates
        • Default Stylesheets
        • Themable Functions
    • Summary
  • Chapter 5: Intercepts and Overrides
    • Overriding the Default CSS
      • CSS Overrides in Action
    • Overriding Templates and Themeable Functions
      • Various Approaches to Overriding Default Styling
        • Substituting Templates
        • Overriding Templates
        • Placing Function Overrides in the template.php File
        • Overriding Themable Functions with Dedicated Template Files
      • Where to Place Themable Function Overrides
      • How to Name Themeable Function Overrides
      • Overrides in Action: A Look at Overrides in Garland
        • Intercepting the Default Template Files
        • Overriding Themable Functions
    • Summary
  • Chapter 6: Modifying an Existing Theme
    • Setting Up the Workspace
    • Planning the Modifications
    • Creating a New Subtheme
    • Making the Transition from Zen to Tao
      • Configuring the Theme
        • Enabling Modules
        • Setting Global and Theme Configuration Options
        • Setting User Access
        • Creating Dummy Content
        • Setting Up Menus
        • Adding New Regions
        • Enabling and Configuring Blocks
      • Adapting the CSS
        • Setting the Page Dimensions
        • Formatting the New Regions
        • Setting Fonts and Colors
        • Formatting the Sidebars and Footer
        • Formatting the Menus
        • Creating the Horizontal Menu
        • Formatting the Vertical Menu
        • Formatting the Search Box and Syndicate Button
        • Formatting the Comments Form and Output
      • Adapting the Themable Functions
        • Overriding a Themable Function
        • Modifying a Default Template
        • Before and After
    • Summary
  • Chapter 7: Building a New Theme
    • Planning the Build
    • Creating a New PHPTemplate Theme
      • Building a .info File
      • Building a page.tpl.php File
        • Insert DocType and Head
        • Insert Body Tags
        • Lay Out the Page Divisions
        • Place the Functional Elements
        • The Final page.tpl.php File
      • The style.css File
      • A Look at Our New Theme
    • Build a New Pure PHP Theme
      • Required Elements
      • HTML Headers
      • Head of Document
      • Implementing the Features
        • Favicon
        • Logo
        • Site Name
        • Site Slogan
      • Primary and Secondary Links
      • Sidebars
        • Sidebar Left
        • Sidebar Right
      • Main Content Area
        • Title and Breadcrumb Trail
        • Tabs
        • Help
        • Messages
        • Content Region
      • Footer
      • Theme Closure
      • Overriding Functions
    • Summary
  • Chapter 8: Dynamic Theming
    • Using Multiple Templates
      • Using a Separate Admin Theme
      • Multiple Page or Section Templates
        • Create a Unique Homepage Template
        • Use a Different Template for a Group of Pages
        • Assign a Specific Template to a Specific Page
        • Designate a Specific Template for a Specific User
    • Dynamically Theming Page Elements
      • Associating Elements with the Front Page
      • Dynamically Styling Modules and Blocks
        • Dynamically Styling Blocks
        • Dynamically Styling the Comment Module
        • Dynamically Styling the Forum Module
        • Dynamically Styling the Polls Module
      • Dynamically Styling Nodes
    • Creating Dynamic CSS Styling
      • Using Dynamic Selectors for Nodes
      • Changing the Body Class Based on $body_classes
    • Working with Template Variables
      • Intercepting and Overriding Variables
      • Making New Variables Available
    • Summary
  • Chapter 9: Dealing with Forms
    • How Forms Work in Drupal
    • How to Approach Modifying Forms
      • Working with the CSS Styling
      • Modifying the Page or Block Holding the Form
        • Templates for Pages Containing Forms
        • Templates for Blocks Containing Forms
      • Override the Default Template Associated with the Form
      • Using a Theme Function to Control Elements
      • Modifying Forms with Custom Modules
    • Solutions to Common Form Issues
      • Modifying Data Labels and Other Text
        • Using form_alter()
        • Using a Function
        • Using a Template
      • Modifying the Styling of a Form
        • Using form_alter()
        • Using a Function
        • Using a Template
      • Using Images for Buttons
    • The Default Forms
      • The User Forms
      • The Login Forms
        • The User Registration Form
        • The Request Password Form
        • The User Profile Form
      • The Default Contact Form
      • The Search Forms
        • The Theme Search Form
        • The Block Search Form
        • The Page Search Form
        • The Advanced Search Form
        • The Search Results Page
      • The Poll Module Forms
        • The Poll Block Form
      • The Poll Page Form
    • Summary
  • Appendix A: Drupal CSS Map
    • A Guide to Drupal Stylesheets
      • admin.css
      • admin-rtl.css
      • aggregator.css
      • aggregator-rtl.css
      • block.css
      • book.css
      • book-rtl.css
      • color.css
      • color-rtl.css
      • comment.css
      • comment-rtl.css
      • dblog.css
      • dblog-rtl.css
      • defaults.css
      • defaults-rtl.css
      • forum.css
      • forum-rtl.css
      • help.css
      • help-rtl.css
      • locale.css
      • maintenance.css
      • node.css
      • node-rtl.css
      • openid.css
      • poll.css
      • poll-rtl.css
      • profile.css
      • search.css
      • search-rtl.css
      • style.css
      • system.css
      • system-rtl.css
      • system-menus.css
      • system-menus-rtl.css
      • taxonomy.css
      • tracker.css
      • update.css
      • update-rtl.css
      • user.css
      • user-rtl.css
    • The Stylesheets of the Default Themes
      • Marvin
      • Bluemarine
      • Pushbutton
      • Garland
      • Minnelli
      • Chameleon
  • Appendix B: The Themers' Toolkit
    • Drupal Modules
      • Content Construction Kit
      • Devel Module
      • Panels Module
      • Views Module
    • Firefox Extensions
      • Firebug Firefox Extension
      • The Web Developer Extension

Ric Shreves

Ric Shreves is a web application development consultant and tech author. Based in Bali, Ric is a partner at water&stone, a digital agency specializing in open source CMS web projects. Ric has been building CMS websites for over 10 years, and during that time has been involved in projects for a number of global brands, including BASF, BearingPoint, Colgate-Palmolive, Tesco Lotus, FPDSavills CBRichard Ellis, Mercy Corps and many others. Ric has published a number of books on open source in general and on open source content management systems in particular. The WordPress 3 Cookbook is his fourth book for Packt.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Find your book in our support section to find errata and to download code samples.

What you will learn from this book

  • Learn about the Drupal 6 Theming Architecture
  • Find and install new themes
  • Get the most from Drupal's theme configuration system
  • Create a new theme from scratch
  • Master PHPTemplate
  • Modify the default templates and styles
  • Override the default templates with your own
  • Create dynamic styling which responds to the content or the user
  • Discover tools that make theming easier and more efficient


Chapter 1: The Elements of a Drupal Theme
– In this chapter we examine how the theme system in Drupal works and examine the different approaches to working with Drupal themes.

Chapter 2: Theme set Up & Configuration – Here we look at all the various theming options that are available in the default Drupal system. By way of example, we take a default theme and customize it using only the options provided by the system.

Chapter 3: Working With Theme Engines – You will learn how the PHPTemplate theme engine works and how you can use this powerful tool,

Chapter 4: Identifying Templates, Style Sheets and Themable Functions – This chapter identifies all the themable elements in the Drupal system and tells you where to find the elements together with an explanation of their functions.

Chapter 5: Intercepts & Overrides – You will learn how to employ intercepts and overrides to modify the default styling in your Drupal theme.

Chapter 6: Modifying an Existing Theme – Here we look at how to implement extensive modifications to a default Drupal theme. This is a hands-on example of the techniques covered in previous chapters.

Chapter 7: Building a New Theme – In this chapter we examine how you can build from scratch a new theme employing the PHPTemplate theme engine.

Chapter 8: Dynamic Theming – You will learn how the Drupal system enables you to vary the styling between sections, pages or users.

Chapter 9: Dealing with Forms – This chapter covers the styling of forms in Drupal, one of the more complex areas in the system.

Appendix A: A Guide to Drupal Style Sheets – An inventory of the contents of all the style sheets in the Drupal system.

Appendix B: The Themers' Toolkit – A listing of tools and extensions that make your work with themes easier and more efficient.

Special Offers

PacktLib gives you access to this and 600+ other titles with an annual or monthly subscription.

Annual subscription:

$220.00 per annum

Monthly subscription:

$21.99 per month

Buy 2 eBooks and Get 50% Off +
Buy Drupal 6 Themes with Drupal 6 Theming Cookbook and get 50% off both the eBooks.
 
Just add both the eBooks to your shopping cart and enter dr66tcebk in the 'Enter Promotion Code' field. Click 'Add Promotion Code' and the discount will be applied.
View more Drupal book offers here  |  View Best Selling eBook offers

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. If you want to create a striking new look for your Drupal 6 website, this book is for you. This book is a revised, updated and expanded edition of Drupal 5 Themes, written specifically for Drupal 6. The book will show you techniques and tools to help you improve the look and feel of any Drupal 6-powered website

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. You will find out about tools to make your theme development easier, and also find invaluable information about under-documented elements of the theming system.

This book is the ideal introduction to theming in Drupal 6

Approach

This book helps you understand the logic behind the theming system employed in Drupal, and how to make it work for you. You will learn key concepts and work through examples with careful, step-by-step instructions.

Who this book is for

The main requirements to make use of this book are knowledge of HTML, CSS, and a touch of creativity - you don't need to know anything about theming in Drupal, although you should be familiar with the basic operation of the Drupal system.

Although this book aims to make Drupal theming accessible to designers, theming in Drupal 6 involves writing some PHP code, and a basic knowledge of PHP will be helpful.

Regardless of your technical skills, this book will teach you to design themes for your Drupal websites in the easiest way.

Are there no books available that are right for you at the moment? How about signing up to our newsletter to keep up to date?
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Sort A-Z