Round Rock / Austin, Texas
Drupal Web Developer

Drupal 7

How to Change the Submitted By Text in Drupal 7

In your theme's template.php file,

function YOURTHEME_preprocess_node(&$vars, $hook) {
$vars['submitted'] = date("n/j/Y", $vars['created']);

View Article

Adding HTML Tags to Titles in Drupal

By default Drupal will not rendor HTML tags in a node's title.  While the "HTML Title" module works for rendoring the actual node correctly it does not work for printing the title correctly in a view.  Here's a little work around I used.

/* template.php */

function MYTHEME_preprocess_html(&$vars) {
   /*make sure to strip out the extra characters for the page title in the <head> tag */
   $vars['head_title'] = MYTHEME_strip($vars['head_title']);

html in node title drupal 7
View Article

Theme Your Drupal Search Results Page Using a View

Want to make your Search Results page match a view you've already themed and formatted? Good news! You can do this pretty easily with just a few steps.

Theme Search Results Using View
View Article

Theming the Search Form in Drupal

Want to customize the Drupal Search Form with a placeholder, custom size, custom submit button text, or use an image for the submit button?  All of the things can be accomplished by adding a function to your theme's template.php file.


Theme Drupal Search Form using template.php
View Article

Check to see if Drupal Content Type in template.php

Today I came across some error messages on my Search Results page because I was checking for a content type in my template.php file's preprocess_page function. Here's some code to to check that you're actually on a node prior to checking the content type.

Drupal if Content Type
View Article

Adding Custom Fields to Ubercart and Getting them to Display on Invoices and Emails

Here's how to add custom fields to the Ubercart checkout screen and get the values to show up on Customer Invoices and Store Admin Emails.

Ubercart Extra Fields Module
View Article

Using the Block Access Module to Limit Editor Roles to Only be able to Update Specific Blocks

The Block Access Module gives granular control over which specific blocks a role has access to modify. The developer can even control which pieces of the block the editor can access. (i.e. Only the body and nothing else)

Block Access Module
View Article

Using Webform Hints Module to Add Placeholder Text to Webforms

One of the graphics designers I work with LOVES to use Plaeholder text on webforms instead of showing regular ole labels.  By default webforms does not provide an option to enter Placeholder Text.  The solution? Install and configure the Webform Hints Module.

Add Placeholder Text to Drupal 7 Webforms
View Article

Using a Super Easy and Lightweight Responsive Framework for a Drupal 7 Theme

As much as I love Bootstrap I don't always need all the fany stuff it provides, especailly since I use it as basic framework for custom Drupal 7 themes. 

Today I found a great solution that helped me convert an old site from non-responsive to responsive in about 2 hours!  Even bigger bonus is it's very lightweight!

I used Graham Miller's Responsive Grid System



Here are the steps I took to convert my Drupal 7 to be responsive:

1) Download css files from

960 grid 1024 grid responsive design
View Article

How to add the Viewport metatag for Drupal 7 sites

If you want your site to be responsive and mobile friendly, the Viewport metatag must be included in the <head> tag of your html.

To do this in Drupal 7, in your theme's template.php file add this code:


function YOURTHEMENAME_preprocess_html(&$vars) {
  $viewport = array(
   '#tag' => 'meta',
   '#attributes' => array(
     'name' => 'viewport',
     'content' => 'width=device-width, initial-scale=1, maximum-scale=1',
  drupal_add_html_head($viewport, 'viewport');

View Article