Designer API
Control the Webflow Designer
page.getBranchId()
Get the branch ID of the current page, or null if the page is not a branch.
null
1page.getBranchId(): Promise<string | null>
Promise<string | null>
string
A Promise that resolves to the branch ID as a string when the page is a branch, or null when the page is not a branch.
1const currentPage = await webflow.getCurrentPage()23const branchId = await currentPage.getBranchId()4if (branchId) {5 console.log('Currently on branch:', branchId)6} else {7 console.log('This page is not a branch.')8}
Try this example