4.9.2 :: Linking to external sites

Description


While <easyLink> will get you started with a link, if you need more control over where your link is positioned and formatting, use the <link> or <externalLink>
The externalLink element allows you to link to absolute URLs either on your site or externally. If you want to build up a site with SEO friendly URLs, this is how you do it!

Quick Example


..snip..
  1.   <row>
  2.   <cell>
  3.   <externalLink>
  4.   <label>go to page 2</label>
  5.   <prefix>Click here to </prefix>
  6.   <url>http://wapl.info/location.htm</url>
  7.   </externalLink>
  8.   </cell>
  9.   </row>
..snip..

Child Elements


url


The destination of the link. This should be a valid WAPL XML file.

Example:

<externalLink>
<url>http://your-domain.com/file1.xml</url>
</externalLink>

label


The clickable link text.

Example:

<externalLink>
<label>My Link Label</label>
</externalLink>

suffix


Adds text after the link.

Example:

<externalLink>
<suffix>some text that i want before the link</suffix>
</externalLink>

prefix


Adds text before the link.

Example:

<externalLink>
<prefix>this text will appear after the link</prefix>
</externalLink>

externalImage


Specify an image to place in the link instead of text. The format for specifying an image inside a link is the same as the externalImage element. For more information about this, please see the <externalImage> element.

Example:

<externalLink>
<externalImage scale="10" filetype="png" quality="90" do_cache="0" class="linkImage">
<url>http://wapl.info/img/header_wapple.png</url>
</externalImage>
</externalLink>

id


Specify an id for your link so that you can use a style sheet to change the way it looks.

Example:

<externalLink id="contactUsLink">

class


Specify a class for your link so that you can use a style sheet to change the way it looks.

Example:

<externalLink class="bigLink">

Detailed Example


..snip..
  1.   <row>
  2.   <cell>
  3.   <externalLink>
  4.   <url>http://wapl.info/location.htm</url>
  5.   <label>go to page 2</label>
  6.   <suffix></suffix>
  7.   <prefix>Click here to </prefix>
  8.   <externalImage scale="25" filetype="jpg" quality="90" do_cache="0" class="linkImage">
  9.   <url>http://hearing.screening.nhs.uk/images/nhspweb/link_icon.jpg</url>
  10.   </externalImage>
  11.   </externalLink>
  12.   </cell>
  13.   </row>
..snip..

Contents