Custom Page API

Updated at:

The custom page API provides lifecycle methods and properties for building and configuring custom pages.

Lifecycle

A custom page is a lifecycle object. For more information, see Lifecycle.

LifecycleProps

LifecycleProps defines the type for props passed to the lifecycle methods of a custom page. It contains two properties: container and customProps. For more information, see LifecycleProps.

interface LifecycleProps {
  container?: HTMLElement;
  customProps?: CustomPage;
}

customProps

props.customProps contains the context information for the custom page.

interface CustomPage {
  pageConfig: ComponentPageConfig;
}

customProps.pageConfig

Contains the context information of the current host page.

interface ComponentPageConfig {
  /** The ID of the current visitor. */
  userId: string;
  /** The account name of the current visitor. */
  userName: string;
  /** The route key of the current page. */
  routeKey?: RouteKey;
}

Pass page information as needed. The following table lists the route keys and their corresponding pages.

Name

Route key

Feature example

Enterprise Portal (Host Page)

viewPortal

image

Custom Page Management Page

customPage

image

Enterprise Portal Configuration Page (Material Bar)

orgAdminPcPortalApp

image