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) + }, + } + }, }