page.setSlug(slug)

Set the slug of the page.

Syntax

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

Parameters

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

Returns

Promise<null>

A promise that resolves to null.

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Set page Description
5await currentPage.setSlug(slug)
6const newSlug = await currentPage.getSlug()
7console.log("Slug",newSlug)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny
Built with