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

1page.usesTitleAsOpenGraphTitle(): Promise<boolean>

Returns

Promise<boolean>

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

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3// Check if page is using the Title as the Open Graph title
4const isOpenGraphTitle = await currentPage.usesTitleAsOpenGraphTitle()
5// Print results
6if (isOpenGraphTitle) {
7 console.log('Page uses Title as Open Graph Title')
8} else {
9 console.log('This page has a custom Open Graph Title')
10}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny
Built with