Set page slug

page.setSlug(slug)

Set the slug of the page.

Syntax

page.setSlug(slug: string): Promise<null>

Parameters

  • slug: string - The new slug of the page.

Returns

Promise<null>

A promise that resolves to null.

Example

// Get Current Page
const currentPage = await webflow.getCurrentPage() as Page
// Set page Description
await currentPage.setSlug(slug)
const newSlug = await currentPage.getSlug()
console.log("Slug",newSlug)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny