close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2110

Table Of Contents

5.2.8 Configuring Web Extensions

A web extension is an addition to the Site Manager. A web extension is part of a standard web application in a servlet container. It displays one or more web pages and might return a result back to the invoking editor by opening a URL to the editor’s remote control with the result of the web extension call as an URL parameter.

CoreMedia CMS contains the following web extension:

  • Preview - Shows a preview of the selected document with different web browsers and different render URLs

<WebContext>

Child elements: <WebExtensions>

Parent element: <Editor>

<Editor>
  ...
  <WebContext host="previewHost" port="40081" context="coremedia">
    ...
  </WebContext>
  ...
</Editor>

The <WebContext> element configures a web application in a Servlet container. Therefore, this element defines connection parameters. It is a container for <WebExtension> elements.

Attribute Description
class Java class with no-arg constructor. Defaults to the value hox.corem.editor.web.SingleSignOnWebContext. Other classes must be sub classes of the class hox.corem.editor.web.WebContext.
host The name of the hosting computer where the web application runs.
port The port of the web application where the web extension runs.
context The name of the web application where the web extension runs.
protocol The protocol part of the URL. Defaults to ‘http’.
loginPort The port for the SSL connection which is used for single sign-on. This port is optional, if the web extension does not require authentication. Currently Preview does not require authentication.
loginPath The path for the SSL connection which is used for single sign-on. Defaults to /servlet/login. Not needed if the web extension does not require authentication.

Table 5.76. Attributes of the WebContext element


<WebExtension>

Child elements: <Pattern>

Parent elements: <WebContext>

  <WebContext host="localhost" port="40081" context="coremedia">
    <WebExtension name="preview" path="/servlet/preview"/>
  </WebContext>

The <WebExtension> element configures a part of a web application which is used to add functionality to the Site Managers.

Attribute Description
class Java class with no-arg constructor. If not set, the class depends on the attribute name. If the name attribute is set to "preview", the class hox.corem.editor.web.Preview is used. Other names will produce an error (if class is not set).
name

The name of the web extension. Existing names are:

  • preview - the preview of documents or folders

path The path to the web application without context and URL query part.
open

Use this attribute only with the preview web extension. It determines which browser(s) are opened, when you call the preview from the toolbar. If open is set to "all", then all defined browsers are opened. If you omit the attribute or set it to "last" (default), then the last selected browser is opened. If you have selected no browser before, the first configured browser is opened. Using the Preview menu item from the File menu, you can always choose the browser to use from all configured browsers.

<WebExtension name="preview" open="all">

Table 5.77. Attributes of the <WebExtension> element


<Pattern>

Child elements:

Parent elements: <WebExtension>

<WebExtension name="preview">
    <Pattern id=”Default Preview” browser=”Internet Explorer”/>
    <Pattern id=”Document-DE” browser=”Internet Explorer” 
      pattern=”%p://%h:%n/de/%i.html”/>
    <Pattern id=”Document-EN” browser=”Internet Explorer” 
      pattern=”%p://%h:%n/en/%i.html”/>
</WebExtension>

The <Pattern>- element is optional and configures two things:

  • one or more browsers

  • one or more URL patterns

If no <Pattern> element is configured, the web extension uses one or more default browsers with the default pattern string. Preview uses all browsers that match the user’s locale when all browsers should open.

Attribute Description
id The unique name of the pattern. Defaults to the browser attribute.
browser The id of the browser to invoke. The value must match an id attribute in element <WebBrowser>.
pattern

A URL pattern string. Defaults to %p://%h:%n/%f. Every web extension may use different patterns with different placeholders. The place holders have the following meaning:

Common to all web extensions:

  • p: protocol

  • h: host name

  • n: port number

  • f: rest of the URL

  • u: path including context name but without URL query

Preview:

  • i: document id

  • v: document version

  • f expands to ‘id=%i’ if version = 0 otherwise to ‘id=%i & version=v

  • I: expands to the URL-encoded string ID of the document

Table 5.78. Attributes of the <Pattern> element


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.