Customizable Header Images for Your Drupal Theme

The dark days of Drupal theming are history. Today, it's pretty easy to find a slick design for your site, and if you need to build one from scratch there are great training tools to make the process painless. (Shameless plug: Lullabot's Theming Basics and Advanced Theming DVDs are a great resource!)

What's still relatively uncommon, though, is support for user-friendly customization by non-designers. Drupal 5 shipped with the re-colorable Garland theme, and a handful of themes support the same feature via Color module. The Nitobe theme offers a choice of header images; Development Seed's Singular theme lets administrators upload a custom background image for a site; and TopNotchThemes' Fusion theme allows administrators to choose fonts and switch from fixed-width to liquid layout using a settings screen.

Adding these kinds of customization options to a theme can make a huge difference in usability for end users and administrators. In this article, we'll learn how to add a "header image" setting to a theme, allowing a site manager to change the site's header from the administration screen!

read more »

Drupal Voices 65: Konstantin Kafer on Optimizing Javascript and CSS

9:09 minutes (8.43 MB)

Konstantin Käfer (aka kkafer) gives an overview of his Drupalcon Paris talk on optimizing the front-end Javascript and CSS -- including some YSlow tips.

Konstantin also talks a bit about his Support File Cache module that allows additional front-end optimizations by allowing you to control the bundling of CSS and Javascript files.

He also talks a bit about the Front-End Drupal that he co-wrote with Emma Jane Hogbin.

Finally, Konstantin talks a bit about some of his favorite changes in Drupal 7.

Download Audio

Drupal Voices 60: Emma Jane Hogbin on Theming and Bazaar version control

12:54 minutes (11.86 MB)

Emma Jane Hogbin is a co-author of Front End Drupal, which covers Drupal's theming system. She talks about that process, and how Lullabot's Using Drupal affected the evolution of Front End Drupal. She also talks about the process of learning Drupal's theming system and some of the exciting changes that have happened since she started with Drupal in 2002/2003. (Also see Addi's popular article "My Aha! Moments in Drupal theming"

Emma Jane is also a user of the Bazaar version control system and talks about the importance of the community of support when deciding upon which version control system to go with.

Emma Jane will also be presenting at the Do It with Drupal conference in New Orleans this December.

Download Audio

Drupal Performance Tip: Block Visibility

This is something we hit a lot when doing performance analysis on very slow websites, so I figured I'd issue a public service announcement. :)

It's not uncommon in more complex themes to have many different block regions, and even dynamic regions that will only appear on certain pages or when viewing nodes of certain types. One very common use-case is to have both a page.tpl.php, and a page-front.tpl.php, each of which print out different regions, particularly for ads or promotions:

Block region examples

Defining block regions is super easy; simply add a couple lines in your theme's .info file:

regions[ad_top]        = Ad Top
regions[ad_bottom]     = Ad Bottom
regions[front_sidebar] = Front Sidebar
regions[sidebar_ad]    = Sidebar Ad
regions[content]       = Content
regions[feature_a]     = Feature A
regions[feature_b]     = Feature B
regions[feature_c]     = Feature C
regions[feature_d]     = Feature D

And then in your *.tpl.php file, wherever you want the region to appear, simply print out its machine-readable name:

<?php
print $feature_a;
?>

Don't want the blocks in the "Feature A" region to show up in page.tpl.php? No problem! Just don't print the region out there! Done! Right?

read more »

My Aha! moments in Drupal theming

While at Drupalcamp Copenhagen I got into a few conversations about Drupal aha! moments, particularly around theming. After trying to talk in the abstract about the things that finally "clicked" for me when I was learning Drupal, I offered to write it up with some specifics. So, for my Danish buddies and any other curious Drupalers, these are my two biggest aha! moments that accelerated my Drupal theming ninja skills: "getting" the theme system and working with forms. I've already written about modifying forms and since "getting the theme system" is a big chunk, I'm going to focus just on that moment in this article.

read more »

Drupal Theming: The Code Behind the Videos

One of the best ways that we've found to learn Drupal is to look at a finished site. Drupal's out-of-the-box experience doesn't really show its full potential. In our latest Drupal theming videos, we needed to build a complete website in order to provide content to "fill out" the theme being built. Once we finished that site, we thought that video viewers and others might like to be able get access and try it out for themselves. So we've done two things with the code:

  1. We've uploaded the code and database to http://960robots.lullabot.com to act as a demonstration of the 960 Robots theme the we built in the videos. This is more for people to look at the front end and HTML output. We've disabled commenting and account registrations in order to keep the site in tact.
  2. We've also bundled up all of the code (modules, core files, etc) along with the database dump and created a installation profile which you can download here and install just like you would install Drupal core.
  3. UPDATE: We've also made available the original HTML template files with associated javascript & images so that you can follow along with the Theming Basics video.

Is This The Long-Awaited Lullabot Drupal Distribution?

read more »

Podcast 74: Drupal Design Round Table

81:25 minutes (30.81 MB)

Colleen Carroll, Nate Haug, Morten Heide (a.k.a. Morten DK), Susan MacPhee, John Albin Wilkins, and Jeff Robbins discuss designing and theming in and around Drupal. The panel discusses the current state of theming, the frustration designers can face when working with the CMS, Drupal design philosophies, and the upcoming Drupal Design Camp in Boston.

Drupal Voices 27: Preston So on Design in Drupal

5:35 minutes (3.29 MB)

Preston So of Monarch Digital talks about Design in Drupal as well as about some of the Birds of a Feather Design tracks at Drupalcon.

For More Information:

Download

Drupal Voices 26: Stephanie Pakrul on Top Notch Themes

9:36 minutes (5.22 MB)

Stepanie Pakrul (aka "stephthegeek") talks about what Top Notch Themes has to offer as well as what's on the horizon.

For More Information:

Download

Drupal Voices 25: John Albin on Theming Improvements for Drupal 7

5:40 minutes (3.17 MB)

John Albin Wilkins of Palantir.net talks about some of the Design & Theming community initiatives for Drupal 7 as well as some of the improvements that have already happened.

John has been at the center of trying to get more designers involved in making Drupal beautiful, and helped initiate the Birds of a Feather design track at Drupalcon, which he talks about more here.

Palantir has been involved with some innovative designs -- like the Herron School of Art & Design, which was nominated for a Webby -- and hopefully we can have some more out-of-the-box beautiful themes for Drupal 7.

For more information:
Drupalcon presentation: How to kill Blue Marine: new core themes for Drupal 7
Design for Drupal

Download

Syndicate content