Help:Contents/Using Images to Link to Web Sites

From MarketsWiki
Jump to: navigation, search

If you want to use an image as a link to a web site, you can't simply reference the image in the usual link syntax. If you're reading this, you probably already figured that out.

The wiki software package contains an extension called "<imagemap>" that allows you to create an invisible map over the top of an image, and have different sections of that image be related to links to pages and web sites. While the extension as a whole is more complicated than necessary for most MarketsWiki articles, it does provide a method for mapping a link to the entire image.

The imagemap extension is used like this:

name of image
desc none
default [web site link]

With the exception of the italics, you have to use imagemap exactly as shown above, specifically:

  • Each part of the command requires its own line, and each part of the command should appear in the order shown above.
  • "desc none" prevents the display of an annoying little blue icon on the image.
  • "default" identifies that the link is to be used everywhere that we didn't otherwise specify... which, since we didn't give any map coordinates, means that the link will map to the entire image.

name of image is the full wiki-fied name of the picture you want to use, without brackets.
web site link is the full URL of the site you want to reference.

Here's a complete example:

 desc none
 default []

And here is the result of that code:

Logo eurex.gif

If you move your mouse over the picture, you'll see that your browser identifies Eurex's web site as the destination when clicked.

If you do have a need to display an image with different areas linked to different pages or sites, and would like additional information on how to make that happen, post a request on Jon's Talk page.