Search.../

currentPage

Gets information about the current page or lightbox.

Type:

StructurePage

 | 

StructureLightbox
Read Only

StructurePage

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 wixSiteFrontend from 'wix-site-frontend';
2
3// ...
4
5const currentPage = wixSiteFrontend.currentPage;
6
7/*
8 * {
9 * "name": "Home",
10 * "type": "static",
11 * "url": "/home",
12 * "isHomePage": true
13 * }
14 */
Get information about the current lightbox

Copy Code
1import wixSiteFrontend from 'wix-site-frontend';
2
3// ...
4
5const currentLightbox = wixSiteFrontend.currentPage;
6
7/*
8 * {
9 * "name": "Welcome (Full Screen)"
10 * "type": "lightbox"
11 * }
12 */