CSS_THEME, 'browsers' => array('IE' => 'IE 8', '!IE' => FALSE), 'preprocess' => FALSE)); drupal_add_js(path_to_theme() . '/js/selectivizr.js'); } if (in_array('ie9', $basic_ie_enabled_versions, TRUE)) { drupal_add_css(path_to_theme() . '/css/ie9.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 9', '!IE' => FALSE), 'preprocess' => FALSE)); } } } function basic_preprocess_page(&$vars, $hook) { if (isset($vars['node_title'])) { $vars['title'] = $vars['node_title']; } // Adding a class to #page in wireframe mode if (theme_get_setting('wireframe_mode')) { $vars['classes_array'][] = 'wireframe-mode'; } // Adding classes wether #navigation is here or not if (!empty($vars['main_menu']) or !empty($vars['sub_menu'])) { $vars['classes_array'][] = 'with-navigation'; } if (!empty($vars['secondary_menu'])) { $vars['classes_array'][] = 'with-subnav'; } // Add first/last classes to node listings about to be rendered. if (isset($vars['page']['content']['system_main']['nodes'])) { // All nids about to be loaded (without the #sorted attribute). $nids = element_children($vars['page']['content']['system_main']['nodes']); // Only add first/last classes if there is more than 1 node being rendered. if (count($nids) > 1) { $first_nid = reset($nids); $last_nid = end($nids); $first_node = $vars['page']['content']['system_main']['nodes'][$first_nid]['#node']; $first_node->classes_array = array('first'); $last_node = $vars['page']['content']['system_main']['nodes'][$last_nid]['#node']; $last_node->classes_array = array('last'); } } } function basic_preprocess_node(&$vars) { // Add a striping class. $vars['classes_array'][] = 'node-' . $vars['zebra']; // Add $unpublished variable. $vars['unpublished'] = (!$vars['status']) ? TRUE : FALSE; // Merge first/last class (from basic_preprocess_page) into classes array of current node object. $node = $vars['node']; if (!empty($node->classes_array)) { $vars['classes_array'] = array_merge($vars['classes_array'], $node->classes_array); } } function basic_preprocess_block(&$vars, $hook) { // Add a striping class. $vars['classes_array'][] = 'block-' . $vars['block_zebra']; // Add first/last block classes $first_last = ""; // If block id (count) is 1, it's first in region. if ($vars['block_id'] == '1') { $first_last = "first"; $vars['classes_array'][] = $first_last; } // Count amount of blocks about to be rendered in that region. $block_count = count(block_list($vars['elements']['#block']->region)); if ($vars['block_id'] == $block_count) { $first_last = "last"; $vars['classes_array'][] = $first_last; } } /** * Return a themed breadcrumb trail. * * @param $breadcrumb * An array containing the breadcrumb links. * @return * A string containing the breadcrumb output. */ function basic_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; // Determine if we are to display the breadcrumb. $show_breadcrumb = theme_get_setting('basic_breadcrumb'); if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') { // Optionally get rid of the homepage link. $show_breadcrumb_home = theme_get_setting('basic_breadcrumb_home'); if (!$show_breadcrumb_home) { array_shift($breadcrumb); } // Return the breadcrumb with separators. if (!empty($breadcrumb)) { $breadcrumb_separator = theme_get_setting('basic_breadcrumb_separator'); $trailing_separator = $title = ''; if (theme_get_setting('basic_breadcrumb_title')) { $item = menu_get_item(); if (!empty($item['tab_parent'])) { // If we are on a non-default tab, use the tab's title. $title = check_plain($item['title']); } else { $title = drupal_get_title(); } if ($title) { $trailing_separator = $breadcrumb_separator; } } elseif (theme_get_setting('basic_breadcrumb_trailing')) { $trailing_separator = $breadcrumb_separator; } // Provide a navigational heading to give context for breadcrumb links to // screen-reader users. Make the heading invisible with .element-invisible. $heading = '