Blog Posts

Implementing a React App and Connecting it to a Custom Drupal Block to Pull in Remote API Data

(23 May 2022)
The basic idea here is to build the React app and test it inside its own environment and then wire it up to Drupal for seamless integration.

Drupal 8 & 9 Theming: How to Render and Format JSON Data With PHP and Twig Using the JSON Field Module

(08 Jun 2021)
There's a neat little Drupal module called JSON Field and recently, I had a chance to play around with it. Out of the box, JSON field is a just a plain field where JSON data can be input and output on a web page.

Drupal 9 DevOps: a Recipe For Setting Up Xdebug 3 With Lando and PHPStorm

(02 Jun 2021)
Recently, I onboarded to a new project that required Lando, a popular local development server. When I am coding, I consider Xdebug to be of immense value for debugging and defining variables.

Drupal 8 & 9 Tutorial: a Method to Group Fields in Layout Builder Using Ctools Entity View

(27 Sep 2020)
I've been building Drupal 8 sites with Layout Builder and one feature that I think is missing is the ability to group specific fields inside a wrapper for enhanced theming; a layout within a layout if you will.

Layout Builder With Drupal 8: a Few Tips, Tricks, and Gotchas

(25 May 2020)
Over the past month, I have been working on a large scale Drupal 8 build that is leveraging the Layout Builder module for much of the site's displays. If you have not used Layout Builder yet for a project and have been wanting to jump in, I hope this article will serve as a good overview.

Drupal 8 Architecture: How to Add Custom HTML Data Attributes to Menus

(23 May 2020)
In this post, I show you how to extend menu link attributes in a custom module

Drupal 8 Theming: How to Render Custom Datetime formats For Events With Twig

(01 Feb 2020)
In this blog post, I will show you how to theme custom datetime formats using Twig in Drupal 8

Drupal 8 Video Tutorial: How to Get Started with Xdebug using PHPStorm with Docksal

(16 Aug 2019)
In this screencast video tutorial, I show you how to get up and running with Xdebug and PHPStorm using Docksal.

Drupal 8 Architecture: How to Get a Value from a Paragraph’s Parent Entity

(23 Jul 2019)
A common architectural model in Drupal is for one entity to reference another. For example, when using the Paragraphs module to build structured modular content, imagine that you have a paragraph type that references another paragraph type.

Drupal 8 Architecture: Video Tour for Designing Structured Modular Content

(18 Sep 2016)
In this screencast, I'm going to walkthrough how I've been designing structured modular content with Entity Construction Kit and Inline Entity Form in Drupal 8.

Drupal 8: How to Define Variables in Twig Templates as Custom Classes

(15 Sep 2016)
For the past seven months, I've been designing, building, and theming with Drupal 8 for my own side project. Along the way, I've seen huge advancements in these realms versus what was possible with Drupal 7.

Drupal 8: How to Import Existing Site Configuration Into a New Site

(20 Aug 2016)
In this blog post, I experiment with importing an existing Drupal 8 site configuration into a new site. Disclaimer: the steps in this tutorial are not recommend for a live site and are experimental!

Drupal 8: How to Craft Custom Theme Hook Suggestions & Templates

(10 May 2016)
In Drupal 8, there's templates for just about anything and with Drupal 8's new theme hooks, you can really narrow in on crafting a custom template for your specific use case. This makes getting at and altering markup far more accessible than it was in Drupal 6 and 7.

Drupal 8 Development: 5 Things to Add to Your Theming Toolbox

(08 May 2016)
My uncle used to say, "You have to use the right tool for the job." This is no different when it comes to Drupal 8 theming and development.

Drupal 8 Theming: How to Set Custom HTML Classes in a Block Region

(27 Mar 2016)
Now that I'm digging into Drupal 8 theming and its awesomeness, I'm discovering some really useful methods and functions. At the same time, I'm learning a lot and having fun.

Drupal 8 Theming: How I got Inspired by Drupal All Over Again

(22 Mar 2016)
When Drupal 8 and its innovative architectural changes were first announced several years back, there were a variety of reactions within the community ranging from euphoria and elation to *FUD* and potential abandonment of the platform altogether.

Drupal Drush Segmentation Fault 11 Error: Avoiding the Rabbit Hole

(18 Jan 2015)
I've been doing a lot lately with Grunt and LibSass within my contrib theme, Gratis. Yesterday, I updated my Node modules locally. Shortly thereafter, I started getting a nasty Drush error.

Drupal 8 DevOps: Leveraging OpenShift Online PaaS

(27 May 2014)
In my free time recently, I've been designing and developing a little Drupal 8 site that I'd like to bring online. From the start, I knew I'd need a decent web host with all the fixins' Drush, Git and most of all, PHP 5.4 as that's the minimum required for Drupal 8.

Drupal 8: Attaching Core Libraries and Other Scripts to Your Theme

(06 Apr 2014)
In this blog post, we learn how to add core and theme scripts in to Drupal 8 using a theme libraries YML or YAML file.

Drupal Theming: Adding Font Awesome Icons to Menu Items

(26 Mar 2014)
I'm currently working on a Drupal build where I'd like users to be able to easily add icons to menu items through the UI. Enter FontAwesome, the scalable vector icon font that leverages the power of CSS. That in combo with the infamous Menu Attributes module allows users to add custom classes to Drupal menu items via the Menu edit interface on a per menu item basis. This is ideal for what we need to accomplish.

Creating an AJAX Node Field Pager with an Embedded Contextual View

(20 Nov 2013)
I get great ideas from users of both my Drupal contrib themes, Bamboo and Gratis. Typically a user will write to me and ask, "how do I do x" with your theme?

Drupal Architecture: Leveraging Entity Reference & Views For Related Content

(12 Nov 2013)
A typical use case for Entity Reference and one that I'll use as an example is if you have news stories on your site and you want your editors to be able to pick a specific related blog post and show it on a news story node.

Features + Drush = Drupal Goodness

(02 Sep 2013)
It's hard to believe I've been using both Features and Drush for a few years but didn't know you can create, update and manage your features all with Drush.

Implementing HTML5 Image Captions with Drupal 7

(09 Jul 2013)
I've been pretty busy these days with a few different projects and a number of them required a user friendly way (editors not needing to know how to code) of implementing captions for images within content areas.

Eclectic but Useful Drupal Modules

(05 Jul 2013)
An overview of an eclectic mix of modules I've found really useful lately for some projects I've been working on with a few examples and use cases.

Designing a Responsive Lightbox Photo Grid Gallery for Drupal 7

(04 Jul 2013)
Lately, I've been designing and developing photo galleries for both clients and myself. I thought it would be nice to share some methods and practices that I've learned. This tutorial will focus on creating node photo grid galleries that can either be stand alone or attached to other content types.

Custom Taxonomy Pages with Drupal Views Using Selective Overrides

(15 Jun 2013)
Drupal 7 has an option to turn on a default View for Taxonomy term pages via the contrib module, Views. This is generally pretty good but if you want highly designed pages with additional custom fields than what the default view renders, you could simply update and customize this view but there's a few drawbacks.

Drupal 7 Preprocess Tricks: Tips From a Themer

(08 Jun 2013)
In the course of a day as a Drupal Themer, I need to code a wide variety of functionality into a given site I'm working on. I try to follow Drupal best practices as well and this usually means implementing theme preprocess functions; these become key to a Themer's toolbox.

Theming a Multi-level Responsive Menu in Drupal 7

(03 Jun 2013)
In my last post, I discussed my new photography site I'm building and theming with Drupal. The site is responsive and I've been searching for an ideal responsive touch friendly multi-level menu. I looked at and tried several jQuery plugins, CSS3 styles and a few Drupal Modules but nothing was quite right.

Drupal Theming and Design: A Minimalistic Approach

(24 May 2013)
Lately, I've been devoting much of my free time to developing better methods of Drupal theming to achieve streamlined processes, simplicity and minimalistic code.

Random Acts of Drupal

(09 Mar 2013)
A few months ago, I became a full Drupal contributor on with my theme Bamboo. I have to say that contributing to Drupal has been an eye opening experience and extremely rewarding.

Leveraging Drupal 7 API Functions for Theming Field Array Element Data

(24 Jan 2013)
In my last article I demonstrated how to extract basic data from field array elements which is ideal for custom node theming. The key to this is using *field_get_items*. I'll expand upon that by adding in additional Drupal API functions to enhance and format these Field array elements.

Drupal 7 Fields: Digging Deep into the Data for Themers

(23 Jan 2013)
In this article, I'll show how to really dig into data associated with a field and for that I'll use a preprocess function in your theme's template.php for the logic and then a variable for presentation in a custom node template.

Drupal 7 Multi-sites and a Git Workflow

(20 Oct 2012)
I've been playing around with Drupal 7 Multi-sites lately on my local development environment and was trying to figure out how to add a multisite to git.

Drupal Tips, Tricks and Gotchas

(16 Oct 2012)
The more Drupal web projects I do, the more I keep having to solve similar issues that arise during development or reusing similar code snippets. Typically you can use Features or write a small module for a lot of things but sometimes, you just need that one code snippet or quick fix.

Customizing the User Login Page in Drupal 7

(17 Aug 2012)
I was recently tasked with theming a customized user login page in Drupal 7. I could not find a whole lot of documentation for this so the first place I looked was in the core modules folder hoping to find something like user--login.tpl.php that I would be able to copy and put in my theme folder for an override.

Customizing the Title on Account Pages in Drupal 7 Using a Theme Preprocess Function

(25 Jul 2012)
The Drupal 7 Account pages (user, user/register, user/password), all have the same Title, i.e. "User Account". I just ran up against this issue and my client wanted different / custom titles on these pages.

Using Views Contextual Filters to Create a Related Content Block With Drupal 7

(20 Jul 2012)
I recently built my new photo portfolio site High Rock Photo and on single image gallery pages (a Content Type I created), I wanted to show "related" images that were in the same category, images that were tagged with the same taxonomy term.

JQuery Theming Tips for Drupal 7

(18 Jul 2012)
I often see posts on the forums and elsewhere in regard to implementing jQuery scripts and code into Drupal. It seems common that users try to attach JQuery right within page.tpl.php or html.tpl.php. In other words, it's hard-coding a script into a page and it's not ideal. Some try to render it using the PHP filter within a block or node.

Theming a Views Post Date With Drupal 7 ("Date in Parts")

(02 Jul 2012)
In my last blog post I showed how to theme a node post date. I'll take it one step further this time and show how to do the same thing with a View. This assumes you are using the Views Module, and a use case would be if you want to display a feed of items with titles and teasers such as blog posts or news.

Theming a Node Post Date With Drupal 7

(14 Mar 2012)
In this article I will show you how to theme a post date in Drupal 7. The goal is to take a boring date printed inline and theme it so it stands out as a design element.

The 'Drush' of the Matter and Other Drupal Musings

(09 Jan 2012)
I'm a Front End Drupal Developer / Themer / Site Builder and admittedly have been slow in adopting tools like Drush and Git for my workflow. Not because I didn't want to but only that I am very right-brained, so the command line / Terminal to say the least has not been my friend.

Screencast: Creating and Theming a Node Photo Gallery with Drupal 7 and Colorbox

(16 Sep 2011)
I wanted the ability to easily create node galleries and this screencast shows you how to create and theme a node photo gallery using Drupal 7. I will also point out what modules are needed and make reference to those that would have been used in Drupal 6 and are now integrated into core in Drupal 7.

My Favorite Resources for Learning Drupal

(11 Apr 2011)
Recently on Twitter, one of my followers asked me for some resources and links for learning Drupal. I thought that would make an excellent blog post. When I first started learning Drupal, I watched screencasts and read all the relevant books I could get my hands on.

Using Drupal Views Arguments to Show Results Only When a Filter is Used

(18 Feb 2011)
Recently I was configuring a Drupal view for a client's website that consisted of the user inputting a zip code and distance to find a store near them. I was using an exposed proximity search filter with a postal code in combination with the Gmap and Location Modules.

How to add a block region to a node page in Drupal 6

(30 Dec 2010)
As a Drupal themers / front end developers, we are always asked to push the envelope of what's possible with design and theming. With Drupal 6, custom block regions are usually added in page.tpl.php which is normally outside of the actual page node content / comments. It would be above, below content or in sidebars typically.

Screencast: Tracking File Downloads in Drupal 6

(10 Nov 2010)
In this video, we explore how to track file downloads in Drupal 6 using the Filefield Download Tracking, CCK and Private Download modules. I'll also show you how to do this using a hybrid public / private file system.

Theming Unique Home Page Elements in Drupal with $is_front & PHP

(20 Oct 2010)
Ask 10 Drupal Themers how they would accomplish a task in Drupal and you just might get 10 different answers. Most likely those 10 different ways of accomplishing the task would all be valid and unique. This concept would apply when theming a home page element in Drupal; there are several different ways of going about this.

Rewriting Drupal Views Output for Custom Theming & CSS

(20 May 2010)
I love it when we discover one of those wonderful Drupal gems that is not well documented and is very powerful in creating some nice Drupal Views theme customization. We were recently tasked with creating an events calendar that has a custom CCK field called "City". There's a drop down menu with a list of cities to assign the event to.

Leveraging Custom Body Classes for Advanced Theming in Drupal 6

(10 May 2010)
I recently developed a Drupal site where each page in the site was based on a custom content type and needed some very specific theming. Although my custom theme was based on, I decided to borrow from the zen theme its custom body class implementation to give more meaningful CSS classes to leverage for theming.

How to Customize and Theme Post & Date info in Drupal 6

(01 Apr 2010)
When I was theming my blog in Drupal, I decided I wanted a better way to customize and display post info such as wording used and the way date was displayed. The first step is to have a look around and see where the code is coming from that renders this info. I viewed the files in my custom theme folder and discovered these few lines of code in node.tpl.php