setPageTitle()

Sets the title of the current dashboard page in the browser tab.

The setPageTitle() method can only be called from dashboard pages. You can't call it from dashboard plugin extensions.

Call the setPageTitle() method whenever the page reloads, or to apply a new title when updating a page's content dynamically, without reloading.

Set the page title to null to reset the title to the default dashboard page title.

Method Declaration

Copy

Parameters

NameTypeDescription
pageTitlestring or nullPage title to set.

Returns

void

Examples

Note: To call this method in self-hosted apps, you need to create a client. See the setup guide for more details.

Set a page title

Copy

Set page title to a product ID

This code is for a page that includes a product ID in the URL's query params.

Copy
Did this help?