Customizing "View More" Links In Views 1 For Drupal 5

A short, quick and easy tip for views theming and customization.

To customize the text or the destination path/url of a 'view more' link in Views. Add this to template.php in your phptemplate theme and add cases.

<?php
/**
* Override theme_views_more() to set custom link texts and destinations.
* @param $path String
*   The destination of the more link.
*/
function _phptemplate_views_more($path) {
 
$text = 'more';
  switch (
$path) {
    case
'foo/bar':
     
$text = 'doh';
      break;
  }
  return
"<div class='more-link'>" . l(t($text), $path) . "</div>";
}
?>

read more

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options