CorvidReference

WixRouterSitemapEntry

An object representing a single entry in a sitemap.

Table of Contents

PROPERTIES

?
Store values associated with an object.
changeFrequencySets or gets how frequently the page is likely to change.
lastModifiedSets or gets when was the page data last modified.
pageNameSets or gets the page name.
prioritySets or gets the priority of this URL relative to other URLs on your site.
titleSets or gets the page title.
urlSets or gets the relative url of the page.

changeFrequency

Sets or gets how frequently the page is likely to change.

Description

The value of the changeFrequency property provides general information to search engines and may not correlate exactly to how often they crawl the page.

Valid values:

  • "always"
  • "hourly"
  • "daily"
  • "weekly"
  • "monthly"
  • "yearly"
  • "never"

Syntax

get changeFrequency(): string
set changeFrequency(value: string): void
TYPE
?
The kind of data the property stores.
string

Examples

Get the change frequency of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  let changeFrequency = entry.changeFrequency; // "weekly"

}

Set the change frequency of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  entry.changeFrequency = "weekly";

}

lastModified

Sets or gets when was the page data last modified.

Syntax

get lastModified(): Date
set lastModified(value: Date): void
TYPE
?
The kind of data the property stores.
Date

Examples

Get the sitemap entry last modified date

export function myRouter_SiteMap(sitemapRequest) {

  let lastModified = entry.lastModified;
  let year = lastModified.getFullYear(); // 2017

}

Set the sitemap entry last modified date

export function myRouter_SiteMap(sitemapRequest) {

  entry.lastModified = new Date(2017, 9, 13);

}

pageName

Sets or gets the page name.

Syntax

get pageName(): string
set pageName(value: string): void
TYPE
?
The kind of data the property stores.
string

Examples

Get the name of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  let pageName = entry.pageName; // "Page Name"

}

Set the name of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  entry.pageName = "Page Name";

}

priority

Sets or gets the priority of this URL relative to other URLs on your site.

Description

The value of the priority property lets search engines know which pages you deem most important. Its value does not affect how your pages are compared to pages on other sites.

Valid values range from 0.0 to 1.0.

The default priority of a page is 0.5.

Syntax

get priority(): number
set priority(value: number): void
TYPE
?
The kind of data the property stores.
number

Examples

Get the relative priority of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  let priority = entry.priority; // 0.9

}

Set the relative priority of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  entry.priority = 0.9;

}

title

Sets or gets the page title.

Syntax

get title(): string
set title(value: string): void
TYPE
?
The kind of data the property stores.
string

Examples

Get the title of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  let title = entry.title; // "Page Title"

}

Set the title of the sitemap entry

export function myRouter_SiteMap(sitemapRequest) {

  entry.title = "Page Title";

}

url

Sets or gets the relative url of the page.

Syntax

get url(): string
set url(value: string): void
TYPE
?
The kind of data the property stores.
string

Examples

Get the sitemap entry relative URL

export function myRouter_SiteMap(sitemapRequest) {

  let url = entry.url; // "/myRouter/A"

}

Set the sitemap entry relative URL

export function myRouter_SiteMap(sitemapRequest) {

  entry.url = "/myRouter/A";

}