orion.page.content | ||
---|---|---|
![]() |
![]() |
|
Plugging into Orion pages | orion.page.link |
Plugins can contribute page content for a page that is framed by the common Orion banner and equipped with standard Orion page services, such as the related pages menu. The page content itself is rendered in an iframe inside the page. Pages contributed in this way are opened in a URL that specifies the id of the extension.
None. This service is purely declarative.
Implementations of orion.page.content must define the following attributes:
The following snippet defines an orion.page.content extension for showing the Pixlr image editor inside Orion.
provider.registerServiceProvider("orion.page.content", {}, { id: "orion.pixlr.content", name: "Pixlr", saveToken: [{token: "imgapi?image=", terminator: "&"}, uriTemplate: "http://pixlr.com/editor/?image={+OrionHome}{+Location}&referrer=Orion&title={Name}&locktype=true&exit={+ExitURL}&target={+SaveURL}imgapi&locktitle=true,contentProvider=orion.pixlr.content"});
The URL to open this page is /content/content.html#{+Location},contentProvider=orion.pixlr.content
If the page content requires a resource location (for example, it is an editor), then typically the page would be linked using the orion editor extension point. This ensures that the page were opened with a specified location parameter in the URL. The pixlr plugin contributes an editor in this way.
provider.registerServiceProvider("orion.edit.editor", {}, { id: "orion.pixlr", name: "Pixlr Image Editor", uriTemplate: "{+OrionHome}/content/content.html#{+Location},contentProvider=orion.pixlr.content"});
The corresponding "open with" extension point is
provider.registerServiceProvider("orion.navigate.openWith", {}, { editor: "orion.pixlr", contentType: ["image/gif", "image/jpeg", "image/ico", "image/png","image/tiff"]});
![]() |
![]() |
![]() |
Plugging into Orion pages | orion.page.link |