Adding a hyperlink element
This section describes the hyperlink template element,
which can be used to design your document.
Before you begin
About this task
There are two types of hyperlinks:
- Internal hyperlinks: Resolve to a bookmark defined in the document template.
- External hyperlinks: Resolve to an external URL.
The type of hyperlink is defined by the Internal property. The link location is defined in the content of the hyperlink. The text displayed by the hyperlink is defined by the Display property and has the default value of link.
By design, only the first line of content entered for elements that use the Content property display in the template content editor. Subsequent lines of text are hidden so that the template designer can focus on the structure of the template at a given time rather than the content of individual elements.
Rich text, for example <span>, <i>, or <sub> tags,
is now supported inside links with the following considerations:
- All the tags inside the <a> tag are rendered.
- Images act as hyperlinks and there are no "link" strings displayed beside an image.
- If the image is not available, its alternative text is used inside the hyperlink. If the alt text is also not available then a "link" string is used in place of the image inside the hyperlink.
| Link type | Word/PDF | HTML |
|---|---|---|
| XHTML<a> tag link to a Bookmark | Works (independent of EnsureUnique Field in Bookmark field) | Works (independent of EnsureUnique Field in Bookmark field) |
| Hyperlink link to a Bookmark | Works (independent of EnsureUnique Field in Bookmark field) | Works (independent of EnsureUnique Field in Bookmark field) |
| Hyperlink link to a XHTML<a> tag | Works | Works |
| XHTML<a> tag link to a XHTML<a> tag | Works | Works |