Check if page uses title as Open Graph title

page.usesTitleAsOpenGraphTitle()

Checks if the page uses the page title as the Open Graph title.

Syntax

page.usesTitleAsOpenGraphTitle(): Promise<boolean>

Returns

Promise<boolean>

Returns true if the page uses the page title as the Open Graph title, otherwise returns false.

Example

// Get Current Page
const currentPage = await webflow.getCurrentPage() as Page
// Check if page is using the Title as the Open Graph title
const isOpenGraphTitle = await currentPage.usesTitleAsOpenGraphTitle()
// Print results
if (isOpenGraphTitle) {
console.log('Page uses Title as Open Graph Title')
} else {
console.log('This page has a custom Open Graph Title')
}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny