1.20.x simmons.php template_preprocess_layout__simmons(&$variables)

Process variables for the simmons layout.

File

layouts/simmons/simmons.php, line 10
PHP functions for the simmons layout.

Code

function template_preprocess_layout__simmons(&$variables) {
  if ($variables['content']['sidebar'] && $variables['content']['sidebar2']) {
    $variables['classes'][] = 'layout-two-sidebars';
  }
  elseif ($variables['content']['sidebar'] || $variables['content']['sidebar2']) {
    $variables['classes'][] = 'layout-one-sidebar';
    if ($variables['content']['sidebar']) {
      $variables['classes'][] = 'layout-sidebar-first';
    }
    else {
      $variables['classes'][] = 'layout-sidebar-second';
    }
  }
  else {
    $variables['classes'][] = 'layout-no-sidebars';
  }
}