From 74c8b8fc5a467f4e73511e1a3723b633f2a08acd Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 19 May 2026 14:42:09 -0400 Subject: [PATCH] Add getBranchId, getParentPageId, and listBranches examples --- src/examples/pages.ts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/examples/pages.ts b/src/examples/pages.ts index 9337ed8..4c01725 100644 --- a/src/examples/pages.ts +++ b/src/examples/pages.ts @@ -475,4 +475,43 @@ export const Pages = { }, }, }, + + // Page Branching + pageBranching: { + getBranchId: { + displayName: 'Get branch ID', + code: async () => { + // Get Current Page + const currentPage = (await webflow.getCurrentPage()) as Page + + // Get branch ID + const branchId = await currentPage.getBranchId() + console.log(branchId) + } + }, + + getParentPageId: { + displayName: 'Get parent page ID', + code: async () => { + // Get Current Page + const currentPage = (await webflow.getCurrentPage()) as Page + + // Get parent page ID + const parentPageId = await currentPage.getParentPageId() + console.log(parentPageId) + }, + }, + + listBranches: { + displayName: 'List the branches of a page', + code: async () => { + // Get Current Page + const currentPage = (await webflow.getCurrentPage()) as Page + + // List branches + const branches = await currentPage.listBranches() + console.log(branches) + }, + } + }, }