orion.page.link.related | ||
---|---|---|
![]() |
![]() |
|
orion.page.link | orion.core.linkScanner |
The related link service provides a mechanism for plugins to contribute links to the "Related pages" menu in the Orion page header. Clients can specify when the link is applicable using validationProperties and contentType.
None. This service is purely declarative.
Implementations of orion.page.link.related must define the following attributes:
The following related page link will determine if the current page's target has a GitUrl that conforms to the URL of git repositories hosted at github.com. If so, then parts of the URL are assigned to variables that are used to build the associated github URL.
provider.registerServiceProvider("orion.page.link.related", null, { id: "orion.git.gotoGithub", name: "Show in GitHub", tooltip: "Show this repository at GitHub", validationProperties: [{ source: "GitUrl", match: "github\.com.*\.git", variableName: "GitHubLocation", variableMatchPosition: "only", replacements: [{pattern: ":", replacement: "/"}, {pattern: ".git$", replacement: ""}] }], uriTemplate: "https://{GitHubLocation}" });
If the service extension does not describe a name, tooltip, and uriTemplate, the implementation will look for a command extension of the same id. In this way, commands added to the navigator that link to other pages may be considered for the Related pages menu.
![]() |
![]() |
![]() |
orion.page.link | orion.core.linkScanner |