Skip to main content

Adding text to the Drupal feed icon

An article from ComputerMinds - Building with Drupal in the UK since 2005
10th Dec 2007

Mike Dixon

Senior Mind
Hey, you seem to look at this article a lot! Why not Bookmark this article so you can find it easily in the future?

Drupal's handling of RSS's feeds is generall excellent, BUT sometimes it's nice to add a bit of explanation text to the standard orange feed icon.

Add this little snippet to your template.php file and you can add a bit of text to your Drupal feed icon.


function phptemplate_feed_icon($url) {
    if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), t('Syndicate content'))) {
        return '<a href="'. check_url($url) .'" class="feed-icon">'. $image. ' RSS feed</a>';
    }
}

Hi, thanks for reading

ComputerMinds are the UK’s Drupal specialists with offices in Bristol and Coventry. We offer a range of Drupal services including Consultancy, Development, Training and Support. Whatever your Drupal problem, we can help.