I try to preprocess the content region of the Omega theme for a specific content type. So i have to check the content type inside the <subtheme>_alpha_preprocess_region(&$vars) function so that the preprocess modification only applies to that content type. In that case, we could make use of the menu_get_object() provided by the Drupal API.
preprocess-region.inc
<?php
function <subtheme>_alpha_preprocess_region(&$vars) {
$menu_object = menu_get_object();
if (isset($menu_object->type)) {
if (<content type> == $menu_object->type) {
// Do whatever you want
}
}
}
Done =)
Reference:

One thought on “Drupal 7 – Check if the current loading page is the node view page of a specific content type”