External links filter

m3avrck - January 27, 2008 - 02:17
Showing external and mailto links marked with an icon.

This is a simple filter that adds a CSS class to all external and mailto links. There is a configurable option to include a CSS file that adds different icons for external and mailto links as well (see screenshot at right).

What's so useful about that? The icon indicates it will take you to a new site or pop open your email client. Additionally, you can use jQuery to make these links open in new windows, load them into an iFrame, make a collection of all external links on a page, or whatever.

The advantage to having this as a filter is that the classes are added at node rendering time, meaning they are cached (performance) and there as soon as the page loads (for nifty effects if needed).

Releases

Official releasesDateSizeLinksStatus
5.x-2.02008-Jan-278.13 KBRecommended for 5.xThis is currently the recommended release for 5.x.
 
 

Drupal is a registered trademark of Dries Buytaert.