







![]() |
|
![]() |
This is used to insert a link to an external URL of some sort such as a website.
Usage
An external link consists of the following nested elements.
Name |
Description |
---|---|
linkText |
This is a required element and is used to specify the text to use for the inner text of the link. |
linkAlternateText |
This is an optional element. It is used to specify alternate text for the link that will be displayed when the mouse hovers over it. |
linkUri |
This is a required element and is used to specify the URL to which the link refers. This can be any sort of link (http, ftp, mail, etc). |
linkTarget |
This is an optional element. It is used to specify the target window to use when the link is clicked. If omitted _blank is used to open the external link in a new window. The value _self can be used to open the link in the same window as the topic thus replacing it. |
![]() |
---|
If the URL in the linkUri element contains XML entities such as the ampersand (&), you must encode them or a build error will occur. See the example below. |
Example
![]() |
|
---|---|
Only link text and URI: <externalLink> <linkText>Sandcastle Help File Builder</linkText> <linkUri>http://SHFB.CodePlex.com</linkUri> </externalLink> Added alternate text: <externalLink> <linkText>Sandcastle Help File Builder</linkText> <linkAlternateText>Visit SHFB on CodePlex</linkAlternateText> <linkUri>http://SHFB.CodePlex.com</linkUri> </externalLink> Added link target: <externalLink> <linkText>Sandcastle Help File Builder</linkText> <linkAlternateText>Visit SHFB on CodePlex</linkAlternateText> <linkUri>http://SHFB.CodePlex.com</linkUri> <linkTarget>_self</linkTarget> </externalLink> If the link contains XML entities, they must be encoded (i.e. the ampersand): <externalLink> <linkText>MSDN Documentation Forum</linkText> <linkUri>http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=66&SiteID=1</linkUri> </externalLink> |
Example Output
Only link text and URI: Sandcastle Help File Builder
Added alternate text: Sandcastle Help File Builder
Added link target: Sandcastle Help File Builder
If the link contains XML entities, they must be encoded (i.e. the ampersand): MSDN Documentation Forum