From 507a0b59caa258adcfd2cf3ac77e66ed3dec667b Mon Sep 17 00:00:00 2001 From: zhadn <5179225+AndrewDiMola@users.noreply.github.com> Date: Fri, 17 Apr 2026 02:35:09 -0400 Subject: [PATCH] Add branch navigation examples to pages Companion examples for docs PR webflow/openapi-internal#796. New pageBranching section with: - getBranchId: read branch ID of current page - getParentPageId: read source page ID - listBranches: discover all branches for a page - navigateToBranch: discover + switchPage to first branch - navigateBackToMain: getParentPageId + switchPage back --- src/examples/pages.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/examples/pages.ts b/src/examples/pages.ts index 1f6c0d0..ccadec8 100644 --- a/src/examples/pages.ts +++ b/src/examples/pages.ts @@ -362,4 +362,34 @@ export const Pages = { await currentPage.setOpenGraphDescription(description) }, }, + + // Page Branching + pageBranching: { + getBranchId: async () => { + // Get Current Page + const currentPage = (await webflow.getCurrentPage()) as Page + + // Get branch ID + const branchId = await currentPage.getBranchId() + console.log(branchId) + }, + + getParentPageId: async () => { + // Get Current Page + const currentPage = (await webflow.getCurrentPage()) as Page + + // Get parent page ID + const parentPageId = await currentPage.getParentPageId() + console.log(parentPageId) + }, + + listBranches: async () => { + // Get Current Page + const currentPage = (await webflow.getCurrentPage()) as Page + + // List branches + const branches = await currentPage.listBranches() + console.log(branches) + }, + }, }