Content Service Linking API
The separate Linking API of the Content Service gets HTML representations of the various types of links. The linking commands are exposed under the URL /linking/ relative to the root of the Content Service.
Component Links
Command: /linking/componentLink
| Parameter name | Default value |
|---|---|
sourcePageURI | (none) |
targetComponentURI | (none) |
excludeTemplateURI | (none) |
linkTagAttributes | (empty) |
linkText | (empty) |
showTextOnFail | true |
showAnchor | false |
Parameters with no default value are mandatory, but can be set to the null value tcm:0-0-0.
http://myserver/linking/componentLink?sourcePageURI=tcm:1-50-64&targetComponentURI=tcm:1-55-16&excludeTemplateURI=tcm:0-0-0&linkText=MyLink
Binary Links
Command:/linking/binaryLink
| Parameter name | Default value |
|---|---|
binaryComponentURI | (none) |
anchor | (empty) |
linkText | (empty) |
linkTagAttributes | (empty) |
showTextOnFail | true |
variantId | (empty) |
binaryComponentURI is mandatory, but can be set to the null value tcm:0-0-0.
http://myserver/linking/binaryLink?binaryComponentURI=tcm:9-1389-16&anchor=a1&linkText=alinkText&linkTagAttributes='id=1'&showTextOnFail=false
Dynamic Component Links
Command: /linking/dynamicComponentLink
| Parameter name | Default value |
|---|---|
targetPageURI | (none) |
targetComponentURI | (none) |
targetTemplateURI | (none) |
linkTagAttributes | (empty) |
linkText | (empty) |
showTextOnFail | true |
Parameters with no default value are mandatory, but can be set to the null value tcm:0-0-0.
http://myserver/linking/dynamicComponentLink?targetPageURI=tcm:9-1-64&targetComponentURI=tcm:9-3166-16&targetTemplateURI=tcm:9-1-32&linkTagAttributes='id=1'&linkText=text
Page Links
Command: /linking/pageLink
| Parameter name | Default value |
|---|---|
targetPageURI | (none) |
anchor | (empty) |
linkTagAttributes | (empty) |
linkText | (empty) |
showTextOnFail | true |
parameters | (none) |
targetPageURI is mandatory, but can be set to the null value tcm:0-0-0. parameters must have a value.
http://myserver/linking/pageLink?targetPageURI=tcm:9-1-64&anchor=myAnchor&linkTagAttributes="style='color: red'"&linkText=text&showTextOnFail=true¶meters="a=b"