Example #1
0
/**
 * @file
 * Default page template
 */
if (!empty($page['content_left'])) {
    //if corporate pages
    $page_left_col = ' col-md-3 col-sm-4';
    $page_content_col = ' col-md-8 col-sm-7';
} else {
    if (arg(0) == 'node' && is_numeric(arg(1))) {
        //if article pages
        $page_content_col = ' col-sm-9 col-sm-offset-2 col-md-7 col-md-offset-1';
        $page_sidebar_col = ' col-md-4 col-lg-3 col-lg-offset-1';
    } else {
        if (ibtmedia_pulse_is_homepage() == TRUE) {
            $page_content_col = ' col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-0 col-lg-7 col-lg-offset-1';
            $page_sidebar_col = ' col-sm-10 col-sm-offset-1 col-md-4 col-md-offset-0 col-lg-3 col-lg-offset-1';
        } else {
            //all other pages
            $page_content_col = ' col-md-8 col-lg-9';
            $page_sidebar_col = ' col-md-4 col-lg-3';
            if (empty($page['sidebar'])) {
                $page_content_col = ' col-md-12';
            }
        }
    }
}
?>
<header class="stickyhead">
  <?php 
     ?>
 <?php 
     $attr = array();
     $attr['class'][] = 'small';
     // desktop row
     if ($row_item_count_md >= 4) {
         $row_item_count_md = 0;
     }
     $row_item_count_md++;
     // tablet row
     if ($row_item_count_sm >= 3) {
         $row_item_count_sm = 0;
     }
     $row_item_count_sm++;
     // homepage logic
     if (ibtmedia_pulse_is_homepage()) {
         // desktop clear
         if ($row_item_count_md == 3) {
             $attr['class'][] = 'clear-md';
         }
         // tablet clear
         if ($row_item_count_sm == 2) {
             $attr['class'][] = 'clear-sm';
         }
     } else {
         // desktop clear
         if ($row_item_count_md == 1) {
             $attr['class'][] = 'clear-md';
         }
         // tablet clear
         if ($row_item_count_sm == 1) {