By bighoffa on
I am trying to theme the "Title Links" to nodes displayed within a "Table" View when the option is set to "Title(Link)". I have managed to theme all other links, but I cannot manage to theme these links.
An example of a field in a view would be either Node:Title or Node:Reference with the Display option set to Title(Link).
I setup template.php as follows:
<?php
//custom links
function phptemplate_links($links = array(), $attributes = array('class' => 'links'))
{
return _phptemplate_callback('links', array('links' => $links, 'attributes' => $attributes));
}
?>
I then created a file named links.tpl.php in my theme directory that contains the following:
<?php global $current_view;
$delimiter = ' | ';
$link_count = count($links);
$current = 1;
foreach ( $links as $lnk ) {
// Display the view name for debugging purposes
print $current_view->name . '<br>';
// Print the link
print l($lnk['title'], $lnk['href'], $lnk['attributes']);
// Only print the delimiter if not the last link
if ( $current < $link_count ) {
print $delimiter;
}
$current++;
}
?>
This code affects all links throughout the site except the Title links displayed in Views.
Any thoughts?