function views_ical_plugin_style_ical_feed::attach_to in Views iCal 7
Overrides views_plugin_style_rss::attach_to
File
- ./
views_ical_plugin_style_ical_feed.inc, line 13 - Views style plugin for the Views iCal module.
Class
- views_ical_plugin_style_ical_feed
- Default style plugin to render an iCal feed.
Code
function attach_to($display_id, $path, $title) {
$display = $this->view->display[$display_id]->handler;
$url_options = array();
$input = $this->view
->get_exposed_input();
if ($input) {
$url_options['query'] = $input;
}
$url_options['absolute'] = TRUE;
$url = url($this->view
->get_url(NULL, $path), $url_options);
if (empty($this->preview)) {
$this->view->feed_icon = '';
drupal_add_html_head_link(array(
'rel' => 'alternate',
'type' => 'application/calendar',
'title' => $title,
'href' => $url,
));
}
}