Plugging into Orion pages | ||
---|---|---|
![]() |
||
orion.page.content |
An important part of plugging into Orion pages is supplying links that connect the user to other pages inside and outside of Orion. Page-level linking services allow plugins and page authors to contribute links and other forms of connectivity between an Orion page and other web pages. The most general of these services can be used on any Orion page.
When specifying links to other pages, a service may need to use some information about the page to decide whether a link is applicable and how the link is composed. This is accomplished for many services by using the validationProperties, uriTemplate, and contentType properties in the service definition.
Validation properties describe the properties of a page object that should be analyzed to determine whether a particular service applies to the page. They can optionally store information from page objects into variables that can be referenced in a URI template. Linking services generally specify one or more of these properties in an array. The general format of an individual validation property is as follows:
URI templates describe the link to another page. Variables in the URI template can refer to the page object metadata, to variables named in the validation properties, or to special variables defined in Orion. Variables are referenced using curly brackets. The following variables are system wide variables (independent of the page object or variable names in the validation properties).
For example, the URI template {+OrionHome}/content/content.html#{+Location} links to a particular page (content.html) in the running Orion instance, and includes the value of the Location property in the originating page's object metadata after the hash. Note that we prefix variables with +
in the template to indicate that their value should
not be
percent-encoded when the template is expanded. This is required for any variables that we expect to contain raw URL characters like '/'
, which would otherwise be encoded to %2F
by the template engine.
The URI Template syntax is specified by RFC 6570.
Content types may be used to further validate file-based metadata. For example, if a page link should only be visible when the page is showing HTML or CSS, a content type of "text/css" can be used to express this.
![]() |
||
orion.page.content |