function web_widgets_plugin_display_web_widgets::attach_to in Web Widgets 6
Same name and namespace in other branches
- 7 views/web_widgets_plugin_display_web_widgets.inc \web_widgets_plugin_display_web_widgets::attach_to()
Attach to another view.
File
- views/
web_widgets_plugin_display_web_widgets.inc, line 233 - 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;
$path = url($this->view
->get_url(NULL, $this
->get_path()), array(
'absolute' => TRUE,
));
$width = $this
->get_option('width');
$height = $this
->get_option('height');
$this->view->attachment_after .= web_widgets_render_embed_code($current_style, $path, $width, $height);
}
}