Skip to main content

regions

How to add a class to a Drupal 7 region

Today I needed to add a class to a Drupal 7 region and found the lovely template_preprocess_region() function to do the dirty work for me. With this function, you can easily add any class to your regions with the code below.

In a nutshell, you find the region you want to add the class to and then append your class onto the end of the classes_array variable.