Quicktips

DrupalEasy Quicktips are short, focused posts intended to accomplish a very specific goal. Quicktips are exclusively available first via our @drupaleasy Twitter account.

HTML Newsletters

Published June 20, 2009

Does your site send out HTML-based emails? If so, then you should be aware of the Email Standards Project web site. This site provides a plethora of information on how to ensure your HTML-based emails are rendered properly on a maximum number of email clients.

The site provides a super-simple email client scorecard on the homepage (surprise - Outlook is rated "poor") as well as an acid test for email clients.

Administration Theme

Published June 20, 2009

One of the first things I do when creating a new site is to set the Administrative Theme (admin/settings/admin) to Garland. Two of my main reasons for doing this are:

  • Customer-facing themes are often "heavier" (more images, more CSS, more complex layouts) than core Drupal themes.
  • Garland is a fluid-width theme. Having this flexibility is key in the admin area especially when the main theme is fixed-width.

Ordering Views Attachments

Published June 20, 2009

If you build Views with lots of display attachments, you've no doubt run across the hurdle of re-ordering the attachments. There's no drag-and-drop method of doing so - often developers are forced to go into each attachment changing the attachment position several times in order to wrangle the attachments to the desired order.

One way of getting around this is to export the view, bring the export text into a text editor, and manually move the attachments to the desired order simply by cutting and pasting the attachment code and then re-importing the view.

Internal Pingback

Published June 20, 2009

The Views module has a little-talked about default view that provides a way to display all internal content that links to a particular page. Think of it as an internal "trackback" (or "pingback") that you often see on blog sites.

For example, when exposed as a block, the "backlinks" view displays a list of all the other content on your site that links to the current node. The page view can also be used - the view accepts a node ID as an argument to filter which backlinks are displayed.

Redefine Regions When Creating a Subtheme

Published June 17, 2009

When creating a sub-theme, if you want to add a new region to it, you must remember to redefine the default regions - or bad things will happen.

Here's an example: let's say you're creating a new theme called "squirrel" based on the 960 theme. Since the 960 theme uses Drupal's default regions if you just add your new region to the squirrel.info file, you'd find that all of your inherited (default) regions are now gone and your admin/build/block page is full of messages saying that all your blocks have been disabled.

Theming for IE6

Published June 15, 2009

When theming a Drupal site, I find that there are no sweeter words to hear from the client than "IE6 support is not necessary". Unfortunately, this phrase is far from commonplace. Currently, IE6 has about a 17% market share, so while it is shrinking, it is probably not small enough yet to ignore (but what a glorious day that will be).

Block Visibility

Published June 15, 2009

I was recently was asked by a client to assist them in creating and displaying a block that would only appear on certain pages within the site. In their case, they wanted to only display the block on node pages - but only when the node was of a particular content type.

Transparent PNGs

Published June 15, 2009

The Portable Network Graphics (PNG) format is a great way to display graphics on the web. It is meant to be a one-for-one replacement for the Graphics Interchange Format (GIF) but without all the proprietary craziness (for awhile there, UNISYS owned a patent that involved the GIF format). Unfortunately, its adoption has not been as fast or as complete as one would have hoped. The PNG format is lossless and generally compresses images better than GIF.

Finding the Right Module for the Job

Published June 8, 2009

With over 4,000 available modules, there's no way that anyone can know what each and every single module does. In my opinion, many developers often resort to writing custom modules too quickly without doing their due diligence in looking for an existing module to accomplish the same task.

When I'm working on a site that I think might require a custom module, there's a few steps I take before I break open my code editor (currently Espresso).