baseUrl


baseUrlstringRead-only

Returns the base URL of the request.

Premium sites: Premium site baseUrl

Free sites: Free site baseUrl

Get the base URL of the request
JavaScript
Did this help?

pageName


pageNamestringRead-only

Sets or gets the page name.

Get the request's page name
JavaScript
Did this help?

pages


pagesArray<string>Read-only

Returns the names of the pages associated with this router.

Pages are added and removed from a router in the Editor.

Get the names of the pages associated with this router
JavaScript
Did this help?

prefix


prefixstringRead-only

Returns the router prefix of the request.

Premium sites: Premium site prefix

Free sites: Free site prefix

Get the prefix of the request's URL
JavaScript
Did this help?

user


userWixRouterUserRead-only

Returns the details of the current site user who is logged in.

Returns an object with the id and role of the logged in user who made the request.

Get the user from the request
JavaScript
export function myRouter_SiteMap(sitemapRequest) { let user = sitemapRequest.user; /* * { * "id": "f6q0fb32-b06r-469f-ag4d-9df89afkj5d9", * "role": "Admin" * } */ }
Did this help?