Search...
currentPage
Gets information about the current page or lightbox.
Type:
StructurePage
Read Only|
StructureLightboxStructurePage
StructureLightbox
NAME
TYPE
DESCRIPTION
name
string
The name of the page.
type
string
The type of the page: "static"
or "template"
.
url
string
The URL of the page. If the page is a static
page the url
property is the page's SEO URL.
applicationId
string
If the page is an app page, the applicationId
property is the app's ID.
prefix
string
If the page is a router or dynamic page, the prefix
property is the page's prefix.
isHomePage
boolean
If the page is the Home page, isHomePage
is true
. Otherwise, it does not exist.
Related Content:
Was this helpful?
Get information about the current page
Copy Code
1import wixSite from 'wix-site';23// ...45const currentPage = wixSite.currentPage;67/*8 * {9 * "name": "Home",10 * "type": "static",11 * "url": "/home",12 * "isHomePage": true13 * }14 */
Get information about the current lightbox
Copy Code
1import wixSite from 'wix-site';23// ...45const currentLightbox = wixSite.currentPage;67/*8 * {9 * "name": "Welcome (Full Screen)"10 * "type": "lightbox"11 * }12 */