page.isExcludedFromSearch()

Check if the page is excluded from internal site search.

Syntax

1page.isExcludedFromSearch(): Promise<boolean>;

Returns

Promise<boolean>

A Promise that resolves to a boolean value.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage()
3
4// Check if page is excluded from webflow's internal site search
5const isExcluded = await currentPage?.isExcludedFromSearch()
6
7if (isExcluded){
8 console.log("Current page is excluded from Webflow's internal site search")
9} else {
10 "Current page is included in included in Webflow's internal site search"
11}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.excludeFromSearch(shouldExclude)

Sets whether the page should be excluded from search engine indexing.

Syntax

1page.excludeFromSearch(shouldExclude: boolean): Promise<null>;

Parameters

  • shouldExclude: boolean - Set to true to exclude the page from search engine indexing, false otherwise.

Returns

Promise<null>

A Promise that resolves to null when the page is excluded from search.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage()
3
4// Exclud from search engine indexing
5await currentPage.excludeFromSearch(true)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny

page.usesTitleAsSearchTitle()

Checks if the page uses its title as the search engine title.

Syntax

1page.usesTitleAsSearchTitle(): Promise<boolean>;

Returns

Promise<boolean>

A Promise that resolves to a boolean value

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage()
3
4// Check title
5const usesTitle = await currentPage?.usesTitleAsSearchTitle()
6
7if (usesTitle){
8 console.log('This page uses its Title as the Search Engine title')
9} else {
10 console.log( "This page has a custom search engine title")
11}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.useTitleAsSearchTitle(use)

Sets whether the page should use its title as the search engine title.

Syntax

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

Parameters

  • use: boolean - Set to true to use the page title as the search engine title, false otherwise.

Returns

Promise<null>

A Promise that resolves to null when the search engine title is set.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage()
3
4// Set title as search title
5await currentPage?.useTitleAsSearchTitle(true)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny

page.getSearchTitle()

Retrieves the search engine title of the page.

Syntax

1page.getSearchTitle(): Promise<string>;

Returns

Promise< string>

A Promise that resolves to a string with the search engine title.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Get Search engine title and print details
5const searchEngineTitle = currentPage.getSearchTitle()
6console.log(searchEngineTitle)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.setSearchTitle(title)

Sets the search engine title of the page to the provided value.

Syntax

1page.setSearchTitle(title: string): Promise<null>;

Parameters

  • title: string - The new search engine title to set for the page.

Returns

Promise<null>

A Promise that resolves to a null value when the search engine title has been set.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Set search engine title and print details
5await currentPage.setSearchTitle("My New Title")
6const searchTitle = await currentPage.getSearchTitle()
7console.log(searchTitle)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny

page.usesDescriptionAsSearchDescription()

Checks if the page uses its description as the search engine description.

Syntax

1page.usesDescriptionAsSearchDescription(): Promise<boolean>;

Returns

Promise<boolean>

A Promise that resolves to a boolean value when the description is set.

Example

TypeScript
1// Get current page
2const currentPage = await webflow.getCurrentPage()
3
4// Check search engine description
5const isSearchDescription = await currentPage?.usesDescriptionAsSearchDescription()
6
7if(isSearchDescription){
8 console.log("This page uses its description as the search engine description")
9} else {
10 console.log("This page has a custom search engine description")
11}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.useDescriptionAsSearchDescription(use)

Sets whether the page should use its description as the search engine description.

Syntax

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

Parameters

  • use: boolean - Set to true to use the page description as the search engine description, false otherwise.

Returns

Promise< null>

A Promise that resolves to null when the search engine description is set.

Example

TypeScript
1// Get current page
2const currentPage = await webflow.getCurrentPage()
3
4// Set search description
5await currentPage.useDescriptionAsSearchDescription(true)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny

page.getSearchDescription()

Retrieves the search engine description of the page.

Syntax

1page.getSearchDescription(): Promise<string>;

Returns

Promise< string>

A Promise that resolves to a string with the search engine description.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Get search engine description and print details
5const searchEngineDescription = currentPage.getSearchDescription()
6console.log(searchEngineDescription)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.setSearchDescription(description)

Sets the search engine description of the page to the provided value.

Syntax

1page.setSearchDescription(description: string): Promise<null>;

Parameters

  • description: string - The new search engine description to set for the page.

Returns

Promise<null>

A Promise that resolves to null when the search engine description is set.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Set search engine description and print details
5await currentPage.setSearchDescription(description)
6const searchDescription = await currentPage.getSearchDescription()
7console.log(My New Description)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny

page.usesOpenGraphImageAsSearchImage()

Check if the page uses its Open Graph image as the search engine image.

Syntax

1page.usesOpenGraphImageAsSearchImage(): Promise<boolean>;

Returns

Promise<boolean>

A Promise that resolves to a boolean value to indicate whether a page uses its Open Graph image as a search engine image.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Check page status
5const isOpenGraphImageUsedForSearchEngines = await currentPage.usesOpenGraphImageAsSearchImage()
6
7// Print page status
8if (isOpenGraphImageUsedForSearchEngines) {
9
10 console.log('Page uses Open Graph image as Seach Engine Image')
11} else {
12 console.log('This page has a custom Search engine image')
13}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.useOpenGraphImageAsSearchImage(use)

Choose whether the page should use its Open Graph image as the search engine image.

Syntax

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

Parameters

  • use: boolean - Set to true to use the Open Graph (OG) image as the search engine image, false otherwise.

Returns

Promise<null>

A Promise that resolves to null when the search image is set.

Example

TypeScript
1// Get current page
2const currentPage = await webflow.getCurrentPage()
3
4// Set Open Graph image as search image
5await currentPage?.useOpenGraphImageAsSearchImage(true)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny

page.getSearchImage()

Retrieves the search engine image URL of the page.

Syntax

1page.getSearchImage(): Promise<string>;

Returns

Promise<string>

A Promise that resolves to a string with the search engine image URL.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Get search engine Image and print details
5const searchEngineImage = currentPage.getSearchImage()
6console.log(searchEngineImage)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadPageSettingsAnyAnyAnyAny

page.setSearchImage(url)

Sets the search engine image of the page to the provided URL.

Syntax

1page.setSearchImage(url: string): Promise<null>;

Parameters

  • url: string - The new search engine image URL to set for the page.

Returns

Promise<null>

A Promise that resolves to null when the search engine image is set.

Example

TypeScript
1// Get Current Page
2const currentPage = await webflow.getCurrentPage() as Page
3
4// Set search engine image and print details
5await currentPage.setSearchImage(image)
6const searchImage = await currentPage.getSearchImage()
7console.log(searchImage)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canManagePageSettingsAnyAnyAnyAny