function lineage_view_handler in Taxonomy Lineage 5
1 string reference to 'lineage_view_handler'
File
- ./
lineage.module, line 124
Code
function lineage_view_handler($field, $field_details, $content, $content_details) {
// split lineage string into pieces, i.e. hierarchial path (getting rid of weight numbers, too)
$path = split("\n[0-9]+", "\n" . $content);
$s = '';
// compose the path in readable form
foreach ($path as $a) {
if ($s != '') {
$s .= ' / ';
}
$s .= str_replace("\n", '', $a);
}
// output pseudo-link (without href) with hierarchically indented term and full path via title/alt-rollover
return str_repeat(' ', substr_count($content, "\n") - 1) . '<a title="' . $s . '" alt="' . $s . '">' . $a . '</a>';
}