Search...
path
Gets the path of the current page's URL.
Description
The path for a regular page is after the baseUrl
If the page is a dynamic page or router page, the prefix
appears after the base URL, before the path.
Premium sites:
Path for a regular page, without a prefix:
Path for a dynamic or router page with a prefix:
Free sites:
Path for a regular page, without a prefix:
Path for a dynamic or router page with a prefix:
Type:
Array<string>Read Only
Was this helpful?
Get the path of the current page's URL
Copy Code
1import wixLocationFrontend from 'wix-location-frontend';23// Premium site URL: "https://www.domain.com/elephant?species=african-elephant#desc"4// Free site URL: "https://user_name.wixsite.com/zoo/elephant?species=african-elephant#desc"56let path = wixLocationFrontend.path; // ["elephant"]