function template_preprocess_getlocations_marker_box in Get Locations 7
Same name and namespace in other branches
- 7.2 getlocations.module \template_preprocess_getlocations_marker_box()
Prepares variables for getlocations_marker_box.tpl.php
Parameters
array $variables: An associative array containing all the elements to construct an HTML document suitable for use in a colorbox.
File
- ./
getlocations.module, line 7404 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function template_preprocess_getlocations_marker_box(&$variables) {
if (module_exists('admin_menu')) {
admin_menu_suppress();
}
$getlocations_paths = getlocations_paths_get();
drupal_add_js($getlocations_paths['getlocations_marker_box_path']);
$head_title = t('Getlocations markers');
$variables['head_title'] = $head_title;
$variables['base_path'] = base_path();
$variables['head'] = drupal_get_html_head();
$variables['language'] = $GLOBALS['language'];
$variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
$variables['css'] = drupal_add_css();
$variables['styles'] = drupal_get_css();
$variables['scripts'] = drupal_get_js();
$variables['title'] = $head_title;
// Closure should be filled last.
$variables['closure'] = theme('closure');
// Compile a list of classes that are going to be applied to the body element.
// This allows advanced theming based on context (home page, node of certain type, etc.).
$body_classes = array();
// Add a class that tells us whether we're on the front page or not.
$body_classes[] = $variables['is_front'] ? 'front' : 'not-front';
// Add a class that tells us whether the page is viewed by an authenticated user or not.
$body_classes[] = $variables['logged_in'] ? 'logged-in' : 'not-logged-in';
$body_classes[] = 'no-sidebars';
// Implode with spaces.
$variables['body_classes'] = implode(' ', $body_classes);
}