Code Problem in my template.php Hello i have an awful feeling im just simply doing something fundamentally wrong. I think they are both the same function possin;y Can anyone tell me how to get it all together possibly? thanks

&lt;?php


function ukf2_preprocess_page(&amp;$vars) {
 if (isset($vars['node'])) {
$vars['theme_hook_suggestion'] = 'page__'.$vars['node']-&gt;type; //
}
}
// Finish copy Template for Content type


function ukf2_preprocess_page(&amp;$variables) {

if (!empty($variables['page']['sidebar_first'])) {
    $variables['content_column_class'] = ' class="col-sm-10"';
  }

 else {
    $variables['content_column_class'] = ' class="col-sm-12"';
  }




if (!empty($variables['page']['sidebar_second'])) {
    $variables['content_column_class2'] = ' class="col-sm-8"';
  }

 else {
    $variables['content_column_class2'] = ' class="col-sm-12"';
  }

}
You just need to put all that logic into a single function:

function ukf2_preprocess_page(&amp;$vars) {
  if (isset($vars['node'])) {
    $vars['theme_hook_suggestion'] = 'page__'.$vars['node']-&gt;type; //
  }

  if (!empty($variables['page']['sidebar_first'])) {
    $variables['content_column_class'] = ' class="col-sm-10"';
  }

  else {
    $variables['content_column_class'] = ' class="col-sm-12"';
  }

  if (!empty($variables['page']['sidebar_second'])) {
    $variables['content_column_class2'] = ' class="col-sm-8"';
  }

  else {
    $variables['content_column_class2'] = ' class="col-sm-12"';
  }

}