Options
All
  • Public
  • Public/Protected
  • All
Menu

The current page to render.

Hierarchy

  • Page

Index

Methods

  • Generates a manage content button.

    Parameters

    Returns MetaCollection

    The manage content button meta-data.

  • Generates a manage menu button.

    Parameters

    • type: "EDIT_MENU_LINK"
    • menu: Menu

    Returns MetaCollection

    The menu button meta-data.

  • Generates a meta-data collection for the Experience Manager buttons.

    Parameters

    • type: string
    • Rest ...params: any[]

    Returns MetaCollection

    The button meta-data.

  • getChannelParameters<T>(): T
  • getComponent<T>(): T
  • getComponent<T>(...componentNames: string[]): undefined | T
  • Gets a root component in the page.

    Type Parameters

    Returns T

    The root component.

  • Gets a component in the page (e.g. getComponent('main', 'right')).

    Type Parameters

    Parameters

    • Rest ...componentNames: string[]

      The names of the component and its parents.

    Returns undefined | T

    The component, or undefined if no such component exists.

  • Gets a content item used on the page.

    Parameters

    • reference: string | Reference

      The reference to the content. It can be an object containing an RFC-6901 JSON Pointer.

    Returns undefined | Content

  • Gets a custom content item used on the page.

    Type Parameters

    • T

    Parameters

    • reference: string | Reference

      The reference to the content. It can be an object containing an RFC-6901 JSON Pointer.

    Returns undefined | T

  • getDocument<T>(): undefined | T
  • Gets the page root document. This option is available only along with the Experience Pages feature.

    Type Parameters

    • T

    Returns undefined | T

  • getLocale(): string
  • The page locale, defaults to en_US.

    Returns string

  • Generates a meta-data collection from the provided meta-data model.

    deprecated

    Use getButton method to create buttons.

    Parameters

    Returns MetaCollection

  • getTitle(): undefined | string
  • Returns undefined | string

    The title of the page, or undefined if not configured.

  • getUrl(link?: Link): undefined | string
  • getUrl(path: string): string
  • Generates a URL for a link object.

    • If the link object type is internal, then it will prepend spaBaseUrl or baseUrl. In case when the link starts with the same path as in cmsBaseUrl, this part will be removed. For example, for link /site/_cmsinternal/spa/about with configuration options cmsBaseUrl = "http://localhost:8080/site/_cmsinternal/spa" and spaBaseUrl = "http://example.com" it will generate http://example.com/about.
    • If the link object type is unknown, then it will return undefined.
    • If the link parameter is omitted, then the link to the current page will be returned.
    • In other cases, the link will be returned as-is.

    Parameters

    • Optional link: Link

      The link object to generate URL.

    Returns undefined | string

  • Generates an SPA URL for the path.

    • If it is a relative path and cmsBaseUrl is present, then it will prepend spaBaseUrl.
    • If it is an absolute path and cmsBaseUrl is present, then the behavior will be similar to internal link generation.
    • If it is a relative path and endpoint is present, then it will resolve this link relative to the current page URL.
    • If it is an absolute path and endpoint is present, then it will resolve this link relative to the baseUrl option.

    Parameters

    • path: string

      The path to generate URL.

    Returns string

  • getVersion(): undefined | string
  • Returns undefined | string

    The Page Model version.

  • getVisit(): undefined | Visit
  • Returns undefined | Visit

    The current visit data.

  • Returns undefined | Visitor

    The current visitor data.

  • isPreview(): boolean
  • Returns boolean

    Whether the page is in the preview mode.

  • rewriteLinks(content: string, type?: string): string
  • Rewrite links to pages and resources in the HTML content. This method looks up for a tags with data-type and href attributes and img tags with src attribute. Links will be updated according to the configuration used to initialize the page.

    Parameters

    • content: string

      The HTML content to rewrite links.

    • Optional type: string

      The content type.

    Returns string

  • sync(): void
  • Synchronizes the CMS integration state.

    Returns void

  • toJSON(): any
  • Returns any

    A plain JavaScript object of the page model.