Get page slug

page.getSlug()

Get the slug of the page.

Syntax

page.getSlug(): Promise<string>

Returns

Promise<string>

A promise that resolves to the slug of the page.

Example

// Get Current Page
const currentPage = await webflow.getCurrentPage() as Page
// Get page slug
const pageSlug = await currentPage.getSlug()
console.log(pageSlug)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny