Check if page is draft

page.isDraft()

Check if the page is a draft.

Syntax

page.isDraft(): Promise<boolean>;

Returns

Promise<Boolean>

A promise that resolves to a boolean value indicating whether the page is a draft.

Example

// Get Current Page
const currentPage = await webflow.getCurrentPage() as Page
// Check page status
const isDraft = await currentPage.isDraft()
// Print page status
if (isDraft) {
console.log('Page is draft')
} else {
console.log('Page is not a draft')
}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
designerAbilityAnyAnyAnyAny