APIsChangelog
Log In

Get the current page

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)