1. 3 great Drupal 7 Modules you may have missed →

  2. Flex Slider Drupal module - Integrates the Flex Slider library into Drupal →

  3. Working with Drupal blocks (content in regions) →

    Blocks are the boxes of content (such as “User Login” or “Who’s online”) that can be displayed in regions (such as footer or sidebar) on your page.

    Blocks are made available to your site most commonly by enabling modules. Once created, a Block can be modified to adjust its appearance, shape, size and position - or which Website pages it appears on. For example, enabling the core Poll module makes the “Most Recent Polls” block available for you to place in a region. Also note that some modules provide multiple blocks when enabled, others may not define new blocks.

    Blocks are placed in regions via the Block Admin page Administer > Site building > Blocks(Drupal 6), Dashboard > Structure > Blocks (Drupal 7).

    Read more

  4. Adding custom body classes to the standard Drupal output based on the existence of some regions

    Here’s an example on how to add custom classes to the body tag output of your Drupal theme. Specifically, this example guides you on how to add a body class attribute when custom regions are not displayed.

    Just place the following code in your template.php file inside your theme’s folder.

    Drupal 6

    function YOURTHEMENAME_preprocess_page(&$variables) {
    if (empty($variables['REGION'])) {
    $body_classes = explode(' ', $variables['body_classes']);
    $body_classes[] = 'no-REGION';
    $variables['body_classes'] = implode(' ', $body_classes);

    *Dont’t forget to print $body_classes on your page template
    <body class=”<?php print $body_classes;?>”>

    Drupal 7

    function YOURTHEMENAME_preprocess_html(&$variables) {
    if (empty($variables['page']['REGION'])) {
    $variables['classes_array'][] = 'no-REGION';

    If the preprocess function is already being called in your template.php file, then you will need to combine these code blocks together because you cannot call the same function twice.

    Finally, clear all cached data. This step is important in order to force your template to be informed for the changes you have made in the template files. To do this go to Administer » Site configuration » Performance » Clear cached data

  5. Adding viewport meta tag to Drupal 7 theme without overriding html.tpl.php

    You can use drupal_add_html_head() for adding the viewport meta tag. In your theme template.php file, you can call hook_page_alter() for embeding meta.

    function YOURTHEMENAME_page_alter($page) {
    // <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1”/>

    $viewport = array(
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => array(
    'name' =>  'viewport',
    'content' =>  'width=device-width, initial-scale=1, maximum-scale=1')

    drupal_add_html_head($viewport, ‘viewport’);

  6. Drupal Using Newer Versions of jQuery →

    You will often need a newer version of jQuery to be able to use a certain jQuery plugin. There are several ways to achieve this.

  7. Selecta, a brand new free theme for Drupal 7 →

  8. Big News: Meet Selecta, a brand new FREE theme for Drupal 7. Just released! →

  9. Drupal 7 Tutorial: Creating Custom Formatters with the Field API →

    Custom formatters are a great way to control the output of your fields. In this tutorial I’m going to use an example that takes a user’s Facebook URL as the input and outputs a button of the Admin’s choosing, along with an option to open the link in a new window.

  10. Add HTTP Headers Using #attached in Drupal 7 →