For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
      • Create folder
      • Create page
      • Get all pages and folders
      • Get the current page
      • Switch to a page
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.switchPage(page)
  • Syntax
  • Parameters
  • Returns
  • Example
  • Switching to a branch page
  • Designer Ability
Pages & FoldersCreating & Retrieving Pages and Folders

Switch to a page

Was this page helpful?
Previous

Set page metadata

Next
Built with

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)

Try this example

Switching to a branch page

Branch pages are regular pages internally, so you can pass a branch page to switchPage() to navigate to a branch. Use page.listBranches() to discover available branches and page.getParentPageId() to navigate back to the main page.

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny