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)

Designer Ability

Checks for authorization only

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny