Movatterモバイル変換


[0]ホーム

URL:


BloomreachBloomreach
Hippo CMS

Bloomreach Documentation version

Bloomreach.com

Use the Open UI Extension Client Library

Introduction

Goal

Use the Bloomreach Open UI Extension JavaScript Client Library to develop your own UI extension.

Background

Communication between anOpen UI extension and the CMS UI is handled by a JavaScript library provided by Bloomreach. The library hides the complexity of thewindow.postMessage communication with the CMS and provides a stable public API.

See also theTypeScript API reference for the OpenUI Extension Library.

Include Client Library

The client library is available as an NPM package:

npm install @bloomreach/ui-extension

The library can be used in two ways.

As a JavaScript module:

import UiExtension from '@bloomreach/ui-extension';

Or as a standalone ES5 script:

<script src="https://unpkg.com/@bloomreach/[email protected]/dist/ui-extension.min.js"></script>

The latter creates a global objectwindow.UiExtension.

Register Extension

TheUiExtension object needs to be registered first: 

UiExtension.register().then((ui) => {  // your code goes here ...});

The code snippet above registers the extension with the CMS application, so the latter knows the extension is ready for communication. Theregister() method returns aPromise that resolves with aui object. Theui object can be used to access information about the CMS and interact with the CMS UI.

API

Static Properties

Theui object contains the following properties:

PropertyDescriptionExample value
ui.baseUrlThe URL of the CMS that hosts the extension."https://cms.example.com"
ui.extension.configThe value of the 'frontend:config' property."{ apiKey: '1234' }"
ui.localeThe locale of the CMS user as selected on thelogin page."nl"
ui.styling *The styling of the user interface in which the extension is shown. For page tools this is always "material" for AngularJS Material."material"
ui.timeZoneThe time zone of the CMS user as selected on the login page."Europe/Amsterdam"
ui.user.idThe username of the CMS user."admin"
ui.user.firstNameThe first name of the CMS user."Suzanna"
ui.user.lastNameThe last name of the CMS user."Doe"
ui.user.displayNameConcatenation of the first and last name of the CMS user, or the username if both are blank."Suzanna Doe" or "admin"
ui.versionThe version of the CMS."13.2.0"

* Available since version 13.2.0.

Extension-Specific Properties, Functions, and Events

Theui object provides several other properties, functions, and events which are specific to a type of extension and are described on the relevant pages:

Did you find this page helpful?
How could this documentation serve you better?
Cheers!
On this page
    Did you find this page helpful?
    How could this documentation serve you better?
    Cheers!

    [8]ページ先頭

    ©2009-2025 Movatter.jp