Returns a link to an item in the given channel.

Syntax

Smartsite SXML CopyCode image Copy Code
locator channel.crosslink(locator item, string channelCode)
locator channel.crosslink(locator item, string channelCode, boolean isRelative)
locator channel.crosslink(locator item, string channelCode, boolean isRelative, enum aim)
locator channel.crosslink(locator item, string channelCode, boolean isRelative, enum aim, enum aimOptions)

Parameters

Name Data Type Description
item Locator The item code or number.
channelCode String The channel code to produce the link for.
isRelative Boolean True if the path must be shown as relative, false if an absolute Url should be shown.
aim Enum The AIM settings.
Enum values:
  • Off
    No AIM scan.
  • Normal
    Automatically determine the source, meaning that relations are added to the actual rendered page being rendered.
  • Autonomous
    Forces Autonomous registration of the relation as a relation of the source item itself, even if the source is a Translation or a RenderTemplate.
aimOptions Enum The aim relation options. Default: automatically determined.
Enum values:
  • Auto
    Automatic determine AIM link type.
  • Softlink
    Soft link.
  • Hardlink
    Hard link.

Return Value

Data Type Description
Locator Url to the specified item.

Expand image Examples

SXML