For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
      • Page information
      • Page settings
        • Check if page is draft
        • Set draft status
        • Check if page is homepage
        • Check if page is password protected
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • page.isDraft()
Pages & FoldersManaging PagesPage settings

Check if page is draft

Was this page helpful?
Previous

Set draft status

Next
Built with

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}

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
designerAbilityAnyAnyAnyAny