> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: setPageTitle() ## Article: setPageTitle() ## Article Link: https://dev.wix.com/docs/sdk/host-modules/dashboard/set-page-title.md ## Article Content: # 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](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/dashboard-plugins/about-dashboard-plugin-extensions.md). 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 ```ts (pageTitle: string) => void ``` ## Parameters | Name | Type | Description | |:------------|:-----------------|:---------------------| | `pageTitle` | `string` or `null` | Page title to set. | ## Returns `void` ## Examples > **Note:** To call this method in [self-hosted apps](https://dev.wix.com/docs/sdk/articles/get-started/about-self-hosted-apps.md), you need to create a [client](https://dev.wix.com/docs/sdk/articles/set-up-a-client/about-the-wix-client.md). See the [setup](https://dev.wix.com/docs/sdk/host-modules/dashboard/introduction.md) guide for more details. ### Set a page title ```js import { dashboard } from '@wix/dashboard'; dashboard.setPageTitle('Product: Green apples'); ``` ### Set page title to a product ID This code is for a page that includes a product ID in the URL's query params. ```js import { dashboard } from '@wix/dashboard'; dashboard.observeState((_, environmentState) => { // Use a regular expression to capture the productId value. const queryParams = environmentState.pageLocation.search; const productIdMatch = queryParams.match(/[?&]productId=([^&]+)/); let productId; if (productIdMatch) { productId = productIdMatch[1]; } // If a product ID was found, set the page title to the ID. if (productId) { dashboard.setPageTitle(`Product: ${productId}`); // If no product ID was found, reset the page title to default. } else { dashboard.setPageTitle(null); } }); ```