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.getCurrentPage()
  • Syntax
  • Returns
  • Example
  • Branch pages
  • Designer Ability
Pages & FoldersCreating & Retrieving Pages and Folders

Get the current page

Was this page helpful?
Previous

Switch to a page

Next
Built with

webflow.getCurrentPage()

Retrieves the current page open in the Designer.

Syntax

1webflow.getCurrentPage(): Promise<Page>

Returns

Promise<Page>

A Promise that resolves to the current page.

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage()
3const pageName = await currentPage?.getName()
4
5// Print page details
6console.log(currentPage, pageName)

Try this example

Branch pages

The returned page might be a branch. Use page.getBranchId() to check whether the current page is a branch, and page.getParentPageId() to get the source page ID.

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny