1

In your template.php file, I know you can use theme_preprocess_region and check what "region" you are in, and accomplish what I am attempting like that...but I was wondering if you can do something like theme_preprocess_region_specific_region to further break things up and not have a lengthy preprocess_region function? I can't seem to find any documentation on that.

2

Well, you can define your own preprocess function if you want to, since you have all the elements for that. In the theme_preprocess_region function, you can simple do :

$function = 'yourtheme_preprocess_region_'.$variables['region'];
if (function_exists($function)) {
  $function($variables);
}

Then, you just have to define the a function for your region :

function yourtheme_preprocess_region_YOURREGION(&$variables) {

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.