webflow.getCurrentPage()
webflow.getCurrentPage()
Retrieves the current page open in the Designer.
Syntax
webflow.getCurrentPage(): Promise<Page>
Returns
Promise<Page>
A Promise that resolves to the current page.
Example
// Get Current Page
const currentPage = await webflow.getCurrentPage()
const pageName = await currentPage?.getName()
// Print page details
console.log(currentPage, pageName)
Designer Ability
Checks for authorization only
Designer Ability | Locale | Branch | Workflow | Sitemode |
---|---|---|---|---|
canAccessCanvas | Any | Any | Any | Any |