Skip to main content

Create a custom default Page

In Here™ Core UI Components v19.0 or later, you can create a custom default page that users see when they add a page in Browser. By default this page contains a single view, but you can override this configuration with the layout and views your workflow requires.

How it works

An addDefaultPage method is available for the WorkspacePlatformProvider interface. You override this method to provide the details of the default page your environment requires.

See the API reference for addDefaultPage.

How to do it

import * as WorkspacePlatform from '@openfin/workspace-platform';

const overrideCallback: WorkspacePlatform.WorkspacePlatformOverrideCallback = async (
WorkspacePlatformProvider
) =>
{
class Override extends WorkspacePlatformProvider
{
addDefaultPage = async (req: AddDefaultPagePayload): Promise<void> =>
{
// Could alter the payload or run your own custom logic and not call super
const decoratedPayload = decorateAddDefaultPagePayload(req);
return super.addDefaultPage(decoratedPayload);
};
}
return new Override();
};
await WorkspacePlatform.init(
{
browser:
{
title: "My Here Core UI Platform"
},
overrideCallback
}
);

Table of Contents