Tag Archives: Drupal

Drupal 7 – Disable certain regions by conditions using Context and Delta

We have talked about how to disable certain regions using the Context module.
Drupal 7 – Disable certain regions by conditions using Context

But seems that it may not work for certain themes and regions. Luckily, there is another module called Delta which could be served as an alternative. Delta not only could disable the region but it could alter any theme settings for specific context condition. Let’s take a look now.
Continue reading Drupal 7 – Disable certain regions by conditions using Context and Delta

Drupal 7 – Disable certain regions by conditions using Context

Context could help you to manage the layout. In the past, i would use the Page manager of Chaos Tool Suite and Panels to control the layout but now i have completely move to the Context module. You can decide which regions should be hidden.

However, i found that it may not work for certain regions and so i raise it in the Context project page. I will keep my eyes on it.
Context – Disable regions
Continue reading Drupal 7 – Disable certain regions by conditions using Context

Drupal 7 – Alter the site logo link in Omega theme

I was working on a Drupal 7 website with Omega theme and i want to customize the site logo link. This can be done by creating the <Omega subtheme>/process/process-region.inc.

<?php
function <theme>_alpha_process_region(&$vars) {
  if (in_array($vars['elements']['#region'], array('content', 'menu', 'branding'))) {
    switch ($vars['elements']['#region']) {
      case 'branding':
        $vars['linked_logo_img'] = $vars['logo'] ? l($vars['logo_img'], '<NEW HOME PATH>', array('attributes' => array('rel' => 'home', 'title' => check_plain($vars['site_name'])), 'html' => TRUE)) : '';
    }
  }
}

Continue reading Drupal 7 – Alter the site logo link in Omega theme

Drupal 7 – Styling checkbox and radio button in Webform

Yesterday we talked about styling the checkbox and radio button as suggested by Ryan Fait.
Styling checkbox and radio button with CSS and Javascript

Here is a simple solution for applying the checkbox and radio button in Drupal 7 webform.

1. Upload the radio.png, checkbox.png and select.png to your subtheme. (Omega subtheme is used in this example.)

checkbox
radio
select

 
Continue reading Drupal 7 – Styling checkbox and radio button in Webform

Drupal 7 – Dynamic select options for Webform

Webform is a great module in Drupal which help collecting user data. Recently i am working on a new website which needs a webform and one of the field is a selection list contains the node titles of a specific content type. I found a blog post about this dynamic select options feature in Drupal 6 by creating a custom module.
xebee – Drupal Webform : Add a dynamic select option list

Here is a similar approach for Drupal 7.
Continue reading Drupal 7 – Dynamic select options for Webform

Drupal 7 – Create Newsletter by Simplenews @ 2

We can use the Simplenews module to deliver newsletter to subscribers.
Drupal 7 – Create Newsletter by Simplenews @ 1

But usually newsletter is colorful HTML with images instead of just plain text. In this post we will continue working with the Simplenews module and try to create a HTML newsletter.

The HTML newsletter requires either the Mime Mail or HTML Mail module. I will use the Mime Mail in this post.
Continue reading Drupal 7 – Create Newsletter by Simplenews @ 2