You are here

function template_preprocess_homebox in Homebox 6

Same name and namespace in other branches
  1. 6.3 homebox.module \template_preprocess_homebox()
  2. 6.2 homebox.module \template_preprocess_homebox()
  3. 7.3 homebox.module \template_preprocess_homebox()
  4. 7.2 homebox.module \template_preprocess_homebox()

Preprocesses variables for home-box.tpl.php template

Parameters

$variables: An array containing variables to used in home-box.tpl.php

Return value

An array containing preprocessed variables (see home-box.tpl.php)

File

./homebox.module, line 174
Home box main file, takes care of global functions settings constants, etc.

Code

function template_preprocess_homebox(&$variables) {

  // Add jQuery UI needed files
  jquery_ui_add(array(
    'ui.draggable',
    'ui.droppable',
    'ui.sortable',
  ));

  // Add collapsible behaviour for adding/hiding blocks
  drupal_add_js($data = "misc/collapse.js");

  // Add Home box JavaScript file
  drupal_add_js($data = drupal_get_path('module', 'homebox') . '/homebox.js', $type = 'module', $scope = 'header', $defer = FALSE, $cache = TRUE, $preprocess = TRUE);

  // Add CSS for home box
  drupal_add_css($path = drupal_get_path('module', 'homebox') . '/homebox.css', $type = 'module', $media = 'all', $preprocess = TRUE);
  return $variables;
}