You are here

function views_calc_field_handler::render_link in Views Calc 6

Same name and namespace in other branches
  1. 6.3 views_calc_field_handler.inc \views_calc_field_handler::render_link()
  2. 7 views_calc_field_handler.inc \views_calc_field_handler::render_link()

Render whatever the data is as a link to the node.

Data should be made XSS safe prior to calling this function.

1 call to views_calc_field_handler::render_link()
views_calc_field_handler::render in ./views_calc_field_handler.inc
Use the requested format function to render the raw alias value.

File

./views_calc_field_handler.inc, line 42
Copied from the basic 'node' field handler.

Class

views_calc_field_handler
Field handler to provide simple renderer that allows linking to a node.

Code

function render_link($data, $values) {
  if (!empty($this->options['link_to_node'])) {
    return l($data, "node/" . $values->{$this->aliases['nid']}, array(
      'html' => TRUE,
    ));
  }
  else {
    return $data;
  }
}