function content_handler_field_multiple::render_link in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 includes/views/handlers/content_handler_field_multiple.inc \content_handler_field_multiple::render_link()
1 call to content_handler_field_multiple::render_link()
- content_handler_field_multiple::render in includes/
views/ handlers/ content_handler_field_multiple.inc
File
- includes/
views/ handlers/ content_handler_field_multiple.inc, line 300 - An extended subclass for field handling that adds multiple field grouping.
Class
- content_handler_field_multiple
- @file An extended subclass for field handling that adds multiple field grouping.
Code
function render_link($data, $values) {
if (!$this->defer_query) {
return parent::render_link($data, $values);
}
if (!empty($this->options['link_to_node']) && $data !== NULL && $data !== '') {
if (method_exists('render_as_link', 'views_handler_field')) {
// Views 2.3+
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = "node/" . $values->{$this->aliases['nid']};
}
else {
// Views up to 2.2
return l($data, "node/" . $values->nid, array(
'html' => TRUE,
));
}
}
else {
return $data;
}
}