Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/examples/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
},
}