function web_widgets_plugin_display_web_widgets::attach_to in Web Widgets 7
Same name and namespace in other branches
- 6 views/web_widgets_plugin_display_web_widgets.inc \web_widgets_plugin_display_web_widgets::attach_to()
Attach to another view.
Overrides views_plugin_display::attach_to
File
- views/
web_widgets_plugin_display_web_widgets.inc, line 245 - Implementation of widget display.
Class
- web_widgets_plugin_display_web_widgets
- The plugin that handles a feed, such as RSS or atom.
Code
function attach_to($display_id) {
$attach_to = $this
->get_option('displays');
if ($attach_to[$display_id]) {
$current_style = $this
->get_option('embed_style');
$current_style = empty($current_style) ? 'iframe' : $current_style;
$variables['path'] = url($this->view
->get_url(NULL, $this
->get_path()), array(
'absolute' => TRUE,
));
$variables['width'] = $this
->get_option('width');
$variables['height'] = $this
->get_option('height');
$this->view->attachment_after .= web_widgets_render_embed_code($current_style, $variables);
}
}