page.isDraft()

Check if the page is a draft.

Syntax

1page.isDraft(): Promise<boolean>;

Returns

Promise<Boolean>

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

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Check page status
5const isDraft = await currentPage.isDraft()
6
7// Print page status
8if (isDraft) {
9
10 console.log('Page is draft')
11} else {
12 console.log('Page is not a draft')
13}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
designerAbilityAnyAnyAnyAny
Built with