function spaces_handler_field_node::render_link in Spaces 6.3
Same name and namespace in other branches
- 7.3 includes/spaces_handler_field_node.inc \spaces_handler_field_node::render_link()
- 7 includes/spaces_handler_field_node.inc \spaces_handler_field_node::render_link()
Override of render_link(). Add purl options to link if 'frontpage' option is enabled. Note that the PURL url is generated using 'absolute' to keep from overriding *all* of render_as_link().
File
- includes/
spaces_handler_field_node.inc, line 64
Class
Code
function render_link($data, $values) {
parent::render_link($data, $values);
if ($data !== NULL && $data !== '' && !empty($this->options['spaces']['frontpage']) && !empty($this->options['spaces']['type'])) {
$this->options['alter']['path'] = url('<front>', array(
'absolute' => TRUE,
'purl' => array(
'provider' => $this->options['spaces']['type'],
'id' => $values->{$this->aliases['nid']},
),
));
}
return $data;
}