Feature hyperlinks are links to web pages that are relevant to the current feature. They give the end user easy access to information related to the feature. For example, if a layer has fields for latitude and longitude, you could create a feature hyperlink that links to the feature’s Google Street View.
In the viewer, feature hyperlinks appear as a section in the feature details.
A feature hyperlink in the viewer
Feature hyperlinks can be static URIs, or they can be generated at run time in the viewer. Generating the URI at run time makes it possible to build values that are specific to the current feature into the URI. This is done by including field tokens or layer tokens in the configured URI. Field tokens are replaced at run time with the field's value for the selected layer. Field tokens can also be used in the hyperlink's text and tool tip.
Example: Feature Hyperlink that Contains a Field Token
The feature hyperlink shown below is configured on the Zip Codes layer. It uses the {ZIP} field token in the hyperlink text, URI, and tool tip. The Icon URI also includes the {VirtualDirectoryUri} client token.
Configuration of a feature hyperlink using field tokens
If a user searched for the zip code 28269 and selected the 28269 feature from the Zip Code layer, the feature details would include the configured feature hyperlink. The feature hyperlink's text would appear as "28269 Census Data", where 28269 is the feature's {ZIP}. In the same way, the URI would point to http://www.city-data.com/zips/28269.html
, where 28269 is the feature's {ZIP}.
The following settings affect all the hyperlinks that are configured for the layer:
Invalid/Broken Links: You can configure whether the viewer should display feature hyperlinks that are invalid or broken. The viewer tests each feature hyperlink before displaying it to determine whether the hyperlink works.
There are three options:
Show: Always show the feature hyperlinks for this layer. This is the default value.
This option is useful when the feature hyperlinks point to your own servers.
Show Disabled: If a feature hyperlink is invalid or broken, show the hyperlink as grayed out in the viewer.
This option is useful when the layer's feature hyperlinks point to external resources that may be temporarily unavailable. The availability of the feature hyperlink depends on the availability of the resource when the user opens the feature details.
Hide: If a feature hyperlink is invalid or broken, do not show the hyperlink in the viewer.
This option can be useful when the layer's feature hyperlinks contain field tokens with invalid or no data, making the links invalid. In this case, the only way to fix the hyperlink for a feature with invalid or missing data is to fix the data.
Individual feature hyperlinks have the following settings:
Hyperlink Text: (optional) The text for the link. You can use field tokens and layer tokens in the Hyperlink Text box. Click Edit to select from a list of available tokens.
If you leave the Hyperlink Text box blank, the URI is used.
URI: The URI to link to. You can use field tokens and layer tokens in the URI text box. Click Edit to select from a list of available tokens.
Encode Field Values: Specify whether to URL encode the values that replace field tokens. URL encoding replaces non-ASCII characters and reserved ASCII characters with safe, equivalent ASCII characters.
The default setting, Automatic, URL encodes tokens when they are combined with text. If the URI box contains only a token (no text), the viewer does not URL encode the value. In this case, the viewer assumes the field contains a complete URI that is already URL encoded.
Tool Tip (optional): The text to display when the mouse hovers over the hyperlink. You can use field tokens in the Tool Tip text box. Click Edit to select from a list of available tokens.
Icon URI (optional): The URI of the icon to display beside the hyperlink. If you leave the Icon URI box blank, the default link icon appears beside the feature hyperlink.
Target: The browser window to open when the user clicks the hyperlink. If you leave the Target setting blank, the link opens in the current browser tab. To open the target in a new window, enter _blank
.
To add a feature hyperlink:
In next to the layer.
Click Add Feature Hyperlink.
Configure the settings.
Configure the settings.
Click OK.
The feature hyperlink is created.
Click Save Site.
To reorder list items, click and drag the Sort handle .