webflow.switchPage(page)

Switch the Designer to a specified page.

Syntax

1webflow.switchPage(page: Page): Promise<null>

Parameters

page : Page - The page to switch to.

Returns

Promise<null>

A Promise that resolves to null when the page switch is complete.

Example

1// Get All Pages and Folders
2const pagesAndFolders = await webflow.getAllPagesAndFolders()
3const pages = pagesAndFolders?.filter((i): i is Page => i.type === "Page")
4
5// Switch Page
6const newPage = pages[2]
7await webflow.switchPage(newPage)

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAn