You are here

function template_preprocess_google_appliance_onebox_module in Google Search Appliance 7

Preprocess a single Onebox module.

File

theme/google_appliance.theme.inc, line 401
theme registry and preprocess functions for the default templates

Code

function template_preprocess_google_appliance_onebox_module(&$vars) {

  // Render results.
  $vars['results'] = array();
  foreach ($vars['onebox']['results'] as $key => $result) {
    $vars['results'][$key]['rendered'] = theme('google_appliance_onebox_result', array(
      'result' => $result,
    ));
  }

  // Provide top-level variables for the onebox.
  $vars['module_name'] = $vars['onebox']['module_name'];
  $vars['provider'] = $vars['onebox']['provider'];
  $vars['url_text'] = $vars['onebox']['url_text'];
  $vars['url_link'] = $vars['onebox']['url_link'];
  $vars['image'] = $vars['onebox']['image'];
  $vars['description'] = $vars['onebox']['description'];
}