function views_rss_handler_field_term_node_tid::pre_render in Views RSS 6.2
Same name and namespace in other branches
- 7.2 views/views_rss_handler_field_term_node_tid.inc \views_rss_handler_field_term_node_tid::pre_render()
File
- views/
views_rss_handler_field_term_node_tid.inc, line 79 - Field handler to display all taxonomy terms of a node.
Class
- views_rss_handler_field_term_node_tid
- @file Field handler to display all taxonomy terms of a node.
Code
function pre_render($values) {
parent::pre_render($values);
// For "RSS <category> element" display type make sure
// that field value will never be rendered as link.
if ($this->options['type'] == 'rss_category') {
if (!empty($this->items)) {
foreach ($this->items as $node_nid => $terms) {
foreach ($terms as $term_tid => $term) {
if (isset($term['make_link'])) {
$this->items[$node_nid][$term_tid]['make_link'] = FALSE;
}
if ($this->options['rss_domain'] != 'none' && empty($this->options['link_to_taxonomy'])) {
$this->items[$node_nid][$term_tid]['path'] = 'taxonomy/term/' . $term['tid'];
}
if ($this->options['rss_include_parents']) {
$this->items[$node_nid][$term_tid]['parents'] = taxonomy_get_parents_all($term_tid);
}
if ($this->options['rss_include_vocabulary']) {
$this->items[$node_nid][$term_tid]['vocabulary'] = $term['vocabulary'];
}
}
}
}
}
}