You are here

function web_widgets_uwa_render in Web Widgets 7

Same name and namespace in other branches
  1. 6 uwa/web_widgets_style_uwa.inc \web_widgets_uwa_render()

Overload the render() of view object.

See also

render() at web_widgets_plugin_display_web_widgets.inc

File

uwa/web_widgets_style_uwa.inc, line 51
UWA-embedding specific functions, preprocessing http://dev.netvibes.com/

Code

function web_widgets_uwa_render($view) {
  $current_style = empty($current_style) ? 'iframe' : $current_style;

  // Decide if it's the widget only (almost static) or the content itself
  $views_path = $view->view->display[$view->view->current_display]->display_options['path'];
  if (strstr($_GET['q'], $views_path . '/uwa')) {

    // TODO Please change this theme call to use an associative array for the $variables parameter.
    return theme('web_widgets_uwa_widget', $views_path, $view->view
      ->get_title());
  }
  else {

    // TODO Please change this theme call to use an associative array for the $variables parameter.
    $content = theme($view
      ->theme_functions(), $view->view);

    // TODO Please change this theme call to use an associative array for the $variables parameter.
    return theme('web_widgets_uwa_wrapper', $content);
  }
}