Sites Rendering API for Oracle Content and Experience

Sites Rendering API

The Sites Rendering API (SCSRenderAPI) is a window-global object present on all Oracle Content and Experience web pages. It is primarily responsible for rendering the slots and components of the page, and it provides an interface for JavaScript code present on theme layouts. The runtime SCSRenderAPI renders the view and preview display modes. The design time SCSRenderAPI renders navigate, edit, and annotation display modes.

In the runtime, the SCSRenderAPI has three general purposes:

  1. Populate the slots on the page with components and content.
  2. Satisfy informational requests made by JavaScript code found on the page layout.
  3. Raise events during the lifecycle of the page-rendering process.

In the design time, the SCSRenderAPI has four general purposes:

  1. Populate the slots on the page with components and content.
  2. Satisfy informational requests made by JavaScript code found on the page layout.
  3. Raise events during the lifecycle of the page-rendering and editing process.
  4. Interact with Site Builder to allow page editing and annotation.

The SCSRenderAPI is loaded in Oracle Content and Experience web pages by placing the following script tag on theme layouts:

<script data-main="/_sitescloud/renderer/renderer.js" src="/_sitescloud/renderer/require.js"></script>

This is normally placed at the bottom of layouts. (Note that the URLs in this tag will automatically be adjusted for the appropriate environment, design time or runtime.) The SCSRenderAPI object loads asynchronously; customer JavaScript code can listen for the availability of the SCSRenderAPI by handling the scsrenderstart event.