Tag Archives: Drupal 7

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

Drupal 7 – Restrict Access by Role (403 Access Denied) for specific paths

Today i would like share another module about Drupal access permission. It is called Path Access.

With the help of the Empty Page module, i could create any blank templates with different blocks. But unlike Views page, these empty pages do not have access permission settings. Luckily the Path Access module could fill the gap.

If you have enabled the Path Access module, you can configure the forbidden paths for different roles @ admin/config/people/pathaccess.
Continue reading Drupal 7 – Restrict Access by Role (403 Access Denied) for specific paths