Drupal Theming

Want to be kept informed whenever new content is added to Pixel Clever? If so you can subscribe to the RSS for the whole site, or for particular subjects that interest you. Below is a listing of feeds that you may find useful.

The Pixel Clever Blog feed: News, Announcements, commentary on Drupal, project management and on technology in general.
/blog/feed

In Drupal 6 views has been completely rewritten from the ground up, and as such we have to adjust the little code snippets that we developers have collected over the years to compensate.

The old way ( Drupal 5 views 1 ) of inserting a view into a tpl or into a php enabled content area was as follows:

This has now changed to the following:

BlueCitron is actually two themes in one; a fixed width theme and a fluid width theme. It is built using a pure CSS (table free), standards compliant and cross browser compatible layout. This the first theme that I have contributed to the Drupal community, but I intend to create others as time allows (I have quite a bit on my plate these days).

You can download BlueCitron from the BlueCitron project page at: http://drupal.org/project/bluecitron

There are several ways to insert blocks onto a page with Drupal. You can use panels, you can add a region to the theme, or you can call the blocks programmatically with php. Though it might not seem evident at first there are some situations where it really is much easier, or better just to call a block with php rather than using the other options. One good example is where you want to add a particular block to a page that shows up in an odd location (such as the top right hand corner of the page) where panels can’t get to.

Drupal blocks can be themed on several levels. You can create a custom html layout for all the blocks on your site, you can create a different layout for a specific region on your site, you can customize the blocks according to the module that created the blocks, or you can even theme an individual block with its own unique html and corresponding CSS styles.

Drupal is made to be customized; however some parts of Drupal theming don’t have much documentation written about them. Theming the search form is a good example. I don’t know if someone has added a tutorial in the last couple of months, but when I made the switch from Drupal 5 to Drupal 6 I couldn’t find a tutorial anywhere that explained how to do it, and the function that I had used for Drupal 5 was no longer working. So I tinkered with it a little, and after a bit of trial and error I came up with a method that works.