Set page to use title as Open Graph title

page.setUsesTitleAsOpenGraphTitle(value)

Indicate whether the page should use its title as the Open Graph (OG) title.

Syntax

1page.useTitleAsOpenGraphTitle(use: boolean): Promise<null>

Parameters

  • use: boolean - Set to true to use the page title as the Open Graph title, otherwise set to false.

Returns

Promise<null>

Returns null if successful.

Example

1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3// Set page title as open graph title
4await currentPage.useTitleAsOpenGraphTitle(true)
5const title = await currentPage.getOpenGraphTitle()
6console.log(title)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny
Built with