O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling all external links in a page

This recipe will describe how the external links module can be used to style URLs linking to external sites and links which use the mailto: protocol to reference e-mail addresses.

Getting ready

The external links module can be downloaded from http://drupal.org/project/extlink and is assumed to have been enabled.

How to do it...

The external links module works out of the box as it functions based on JavaScript. To see the module in action, create or edit a node with the following modifications:

  • Add a link to an internal URL: for example,<a href="/about">About us</a>.
  • Add a link to an external URL:<a href="http://drupal.org">Drupal</a>.
  • Add an e-mail link using the mailto protocol:<a href="mailto:test@example.com">test@example.com</a> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required