Designer API
Control the Webflow Designer
page.isDraft()
Check if the page is a draft.
1page.isDraft(): Promise<boolean>;
Promise<Boolean>
A promise that resolves to a boolean value indicating whether the page is a draft.
1// Get Current Page2const currentPage = await webflow.getCurrentPage() as Page34// Check page status5const isDraft = await currentPage.isDraft()67// Print page status8if (isDraft) {910 console.log('Page is draft')11} else {12 console.log('Page is not a draft')13}
Try this example