webflow.switchPage(page)
webflow.switchPage(page)
Switch the Designer to a specified page.
Syntax
webflow.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
// Get All Pages and Folders
const pagesAndFolders = await webflow.getAllPagesAndFolders()
const pages = pagesAndFolders?.filter((i): i is Page => i.type === "Page")
// Switch Page
const newPage = pages[2]
await webflow.switchPage(newPage)
Designer Ability
Checks for authorization only
Designer Ability | Locale | Branch | Workflow | Sitemode |
---|---|---|---|---|
canAccessCanvas | Any | Any | Any | An |