#90738 by jjeff and ChrisKennedy. first and last are not mutually exclusive.

5.x
Neil Drumm 2006-12-29 08:18:28 +00:00
parent 3bbf87d279
commit b1c11d267f
1 changed files with 8 additions and 2 deletions

View File

@ -534,8 +534,14 @@ function theme_links($links, $attributes = array('class' => 'links')) {
$class = $key;
}
// Add first and last classes to the list of links to help out themers
$extra_class = ($i == 1) ? 'first ' : (($i == $num_links) ? 'last ' : '');
// Add first and last classes to the list of links to help out themers.
$extra_class = '';
if ($i == 1) {
$extra_class .= 'first ';
}
if ($i == $num_links) {
$extra_class .= 'last ';
}
$output .= '<li class="'. $extra_class . $class .'">';
// Is the title HTML?