function business_process_page(&$vars) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert PHPTemplate variables into the templates. */ function boldy_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } // Classes for body element. Allows advanced theming based on context // (home page, node of certain type, etc.) $classes = explode(' ', $vars['body_classes']); // Remove the mostly useless page-ARG0 class. if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-' . drupal_strtolower(arg(0))), $classes)) { unset($classes[$index]); } if (!$vars['is_front']) { // Add unique class for each page. $path = drupal_get_path_alias($_GET['q']); $classes[] = boldy_id_safe('page-' . $path); // Add unique class for each website section. list($section, ) = explode('/', $path, 2); if (arg(0) == 'node') { if (arg(1) == 'add') { $section = 'node-add'; } elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) { $section = 'node-' . arg(2); } } $classes[] = boldy_id_safe('section-' . $section); } $vars['body_classes_array'] = $classes; $vars['body_classes'] = implode(' ', $classes); // Concatenate with spaces. }
/** * Override or insert variables into the page template. */ function bartik_process_page(&$variables) { // Hook into color.module. if (isset($variables['node']->type)) { $nodetype = $variables['node']->type; $variables['theme_hook_suggestions'][] = 'page__' . $nodetype; } if (module_exists('color')) { _color_page_alter($variables); } // Always print the site name and slogan, but if they are toggled off, we'll // just hide them visually. $variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE; $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE; if ($variables['hide_site_name']) { // If toggle_name is FALSE, the site_name will be empty, so we rebuild it. $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal')); } if ($variables['hide_site_slogan']) { // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it. $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', '')); } // Since the title and the shortcut link are both block level elements, // positioning them next to each other is much simpler with a wrapper div. if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) { // Add a wrapper div using the title_prefix and title_suffix render elements. $variables['title_prefix']['shortcut_wrapper'] = array('#markup' => '<div class="shortcut-wrapper clearfix">', '#weight' => 100); $variables['title_suffix']['shortcut_wrapper'] = array('#markup' => '</div>', '#weight' => -99); // Make sure the shortcut link is the first item in title_suffix. $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100; } }
function perma_boot_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert variables into the page template. */ function custom_apim_theme_process_page(&$vars) { // Hook into the color module. if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function bartik_process_page(&$variables) { // Hook into color.module if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert variables into the page template. */ function sky_process_page(&$vars) { // Hook into the color module. if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function pixture_reloaded_process_page(&$vars) { // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function Accessibility_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * @file * template.php */ function floyd_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } // Add information about the number of sidebars. if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) { $variables['content_column_class'] = ' class="col-md-6"'; } elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) { $variables['content_column_class'] = ' class="col-md-9"'; } else { $variables['content_column_class'] = ' class="col-md-12"'; } if (isset($variables['title'])) { $variables['title'] = strip_tags(html_entity_decode($variables['title'])); } if ((drupal_is_front_page() || current_path() == 'node/72' || current_path() == 'node/73') && isset($variables['title'])) { unset($variables['title']); $lat = is_null(theme_get_setting('map_lat')) ? '40.773328' : theme_get_setting('map_lat'); $long = is_null(theme_get_setting('map_long')) ? '-73.960088' : theme_get_setting('map_long'); drupal_add_js('http://maps.google.com/maps/api/js?sensor=true', 'external'); $floyd_path = drupal_get_path('theme', 'floyd'); drupal_add_js($floyd_path . '/js/gmap3.js'); drupal_add_js("\n function isMobile() { \n return ('ontouchstart' in document.documentElement);\n }\n function init_gmap() {\n if ( typeof google == 'undefined' ) return;\n var styles = [\n {\n 'featureType': 'water',\n 'stylers': [\n {\n 'color': '#eee'\n },\n {\n 'visibility': 'on'\n }\n ]\n },\n {\n 'featureType': 'landscape',\n 'stylers': [\n {\n 'color': '#f2f2f2'\n }\n ]\n },\n {\n 'featureType': 'road',\n 'stylers': [\n {\n 'saturation': -100\n },\n {\n 'lightness': 45\n }\n ]\n },\n {\n 'featureType': 'road.highway',\n 'stylers': [\n {\n 'visibility': 'simplified'\n }\n ]\n },\n {\n 'featureType': 'road.arterial',\n 'elementType': 'labels.icon',\n 'stylers': [\n {\n 'visibility': 'off'\n }\n ]\n },\n {\n 'featureType': 'administrative',\n 'elementType': 'labels.text.fill',\n 'stylers': [\n {\n 'color': '#444444'\n }\n ]\n },\n {\n 'featureType': 'transit',\n 'stylers': [\n {\n 'visibility': 'off'\n }\n ]\n },\n {\n 'featureType': 'poi',\n 'stylers': [\n {\n 'visibility': 'off'\n }\n ]\n }\n ]\n var options = {\n center: [" . $lat . ", " . $long . "],\n zoom: 16,\n mapTypeControl: false,\n disableDefaultUI: true,\n zoomControl: false,\n scrollwheel: false,\n styles: styles\n }\n\n if (isMobile()) {\n options.draggable = false;\n }\n var pathToTheme = Drupal.settings.basePath + 'sites/all/themes/floyd';\n var image = pathToTheme + '/images/mapicon.png'; \n\n jQuery('#map').gmap3({\n map: {\n options: options\n },\n marker: {\n latLng: [" . $lat . ", " . $long . "],\n // options: { icon: image }\n }\n });\n }\n jQuery(document).ready(function() {\n init_gmap(); \n });\n \n ", 'inline'); } }
/** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function tundra_subtheme_process_page(&$vars) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } // handy helper for themes, not related to 404 issue $vars['base_path'] = base_path(); // Only does the check if required if (!$vars['show_blocks']) { global $theme; $regions = system_region_list($theme); foreach (array_keys($regions) as $region) { // Only set left and right regions // Drupal core sets the other blocks already // IMHO this shows a real lack of design considerations for leaving these out! if ($region == 'left' || $region == 'right') { $blocks = theme('blocks', $region); if (isset($variables[$region])) { $vars[$region] .= $blocks; } else { $vars[$region] = $blocks; } } } } }
function chamfer_process_page(&$variables, $hook) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert variables into the page template. */ function garland_process_page(&$vars) { // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function corporateclean_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * Implements template_preprocess_page(). */ function sociale_platforme_preprocess_page(&$vars) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert variables into the page template. */ function openchurch_theme_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert variables into the page template. */ function responsive_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert variables into the page template. */ function garland_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); if (isset($vars['main_menu'])) { $vars['primary_nav'] = theme('links', $vars['main_menu'], array('class' => array('links', 'main-menu')), array('text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'))); } else { $vars['primary_nav'] = FALSE; } if (isset($vars['secondary_menu'])) { $vars['secondary_nav'] = theme('links', $vars['secondary_menu'], array('class' => array('links', 'secondary-menu')), array('text' => t('Secondary menu'), 'level' => 'h2', 'class' => array('element-invisible'))); } else { $vars['secondary_nav'] = FALSE; } $vars['ie_styles'] = garland_get_ie_styles(); // Prepare header $site_fields = array(); if (!empty($vars['site_name'])) { $site_fields[] = check_plain($vars['site_name']); } if (!empty($vars['site_slogan'])) { $site_fields[] = check_plain($vars['site_slogan']); } $vars['site_title'] = implode(' ', $site_fields); if (!empty($site_fields)) { $site_fields[0] = '<span>' . $site_fields[0] . '</span>'; } $vars['site_html'] = implode(' ', $site_fields); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function fusion_prosper_process_page(&$variables) { // Hook into color.module. drupal_add_library('system', 'ui'); if (module_exists('color')) { _color_page_alter($variables); } }
/** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert variables into the page template. */ function casasrealprod_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } // Always print the site name and slogan, but if they are toggled off, we'll // just hide them visually. $variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE; $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE; if ($variables['hide_site_name']) { // If toggle_name is FALSE, the site_name will be empty, so we rebuild it. $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal')); } if ($variables['hide_site_slogan']) { // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it. $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', '')); } // Since the title and the shortcut link are both block level elements, // positioning them next to each other is much simpler with a wrapper div. if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) { // Add a wrapper div using the title_prefix and title_suffix render elements. $variables['title_prefix']['shortcut_wrapper'] = array('#markup' => '<div class="shortcut-wrapper clearfix">', '#weight' => 100); $variables['title_suffix']['shortcut_wrapper'] = array('#markup' => '</div>', '#weight' => -99); // Make sure the shortcut link is the first item in title_suffix. $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100; } if (isset($variables['node']) && $variables['node']->type == "casas" && strpos(drupal_get_path_alias(), '/booking') > 0) { drupal_add_js(drupal_get_path('theme', 'casasrealprod') . '/js/casas_booking_manager.js'); $breadcrumbs = array(); $breadcrumbs[] = l(t('Home'), '<front>'); $breadcrumbs[] = l(t('Las Casas'), 'node/10'); $breadcrumbs[] = l($variables['node']->title, 'node/' . $variables['node']->nid); drupal_set_breadcrumb($breadcrumbs); $variables['title'] = t('Search for Availability'); $variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb())); } if (strpos(drupal_get_path_alias(), 'bookings') !== FALSE) { drupal_add_js(drupal_get_path('theme', 'casasrealprod') . '/js/casas_booking_manager.js'); } if (strpos(drupal_get_path_alias(), 'checkout') !== FALSE) { $parts = explode('/', current_path()); $last = array_pop($parts); $title = drupal_get_title(); if (is_numeric($last)) { $title = t('Fill your personal data'); } else { if ($last == 'review') { $title = t('Review order'); } } $variables['title'] = $title; } }
/** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { // print_r($vars); $vars['primary_links'] = _opensourcery_primary_links($vars['primary_links']); $vars['secondary_links'] = _opensourcery_secondary_links($vars['secondary_links']); $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } // Render the slideshow view for homepage $vars['embedded_slideshow'] = views_embed_view('homeslideshow', 'block_1'); //Reload the javascript into the scripts due to a problem with slideshow. $vars['scripts'] = drupal_get_js(); }
/** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } $vars['celebrity_search'] = drupal_get_form('search_celebrity'); // Generate menu tree from source of primary links $vars['primary_links_tree'] = menu_tree(variable_get('menu_primary_links_source', 'primary-links')); }
/** * Preprocesses template variables. * @param vars variables for the template */ function phptemplate_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); if (module_exists('color')) { _color_page_alter($vars); } if (module_exists('mobileplugin')) { $vars['styles'] = _mobileplugin_filter_css($vars['css']); $vars['scripts'] = _mobileplugin_filter_js(); $vars['bodyclasses'] = 'mobile' . _mobileplugin_add_class(); $scaled_logo = _mobileplugin_image_scaled($vars['logo'], 30, 30); if (!is_array($scaled_logo)) { $vars['logo'] = $scaled_logo; } } }
/** * Override or insert PHPTemplate variables into the templates. */ function _phptemplate_variables($hook, $vars) { if ($hook == 'page') { if ($secondary = menu_secondary_local_tasks()) { $output = '<span class="clear"></span>'; $output .= "<ul class=\"tabs secondary\">\n" . $secondary . "</ul>\n"; $vars['tabs2'] = $output; } // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } return $vars; } return array(); }
/** * Override or insert PHPTemplate variables into the templates. */ function openpublish_theme_preprocess_page(&$vars) { // Override core Blog module's breadcrumb if ($vars['node']->type == 'blog') { $breadcrumb = array(l(t('Home'), NULL), l(t('Blogs'), 'blogs')); if ($vars['node']->field_op_author[0]['view']) { $breadcrumb[] = $vars['node']->field_op_author[0]['view']; } $vars['breadcrumb'] = theme('op_breadcrumb', $breadcrumb); } $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
/** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { $vars['tabs'] = ''; $primary = menu_primary_local_tasks(); if (!empty($primary)) { $vars['tabs'] = '<ul class="arttabs_primary">' . $primary . '</ul>'; } $vars['tabs2'] = ''; $secondary = menu_secondary_local_tasks(); if (!empty($secondary)) { $vars['tabs2'] = '<ul class="arttabs_secondary">' . $secondary . '</ul>'; } // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }
function polpo_preprocess_page(&$vars) { if (theme_get_setting('fast_tasks')) { $vars['fast_tasks'] = _polpo_fast_tasks(); } if (theme_get_setting('title_text')) { if (theme_get_setting('title_text_custom')) { $vars['title_text'] = theme_get_setting('title_text_custom'); } else { $vars['title_text'] = variable_get('site_name', 'drupal'); } } // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } }