Documentation

CMainPage Class

CMainPage class is used to handle the index page of a portal.

Note. Methods of this class are used if the sites use "Mode 1. Single web server for all sites" to make multiple sites environment.

Class methods

MethodDescription Available from version
GetSiteByHost Returns site ID, defining it by the current host.
GetSiteByAcceptLanguage Returns the site ID by the Accept-Language variable in the user browser settings.
RedirectToSite Redirects to the index page of the site.
GetIncludeSitePage Returns the absolute path to the index page of the specified site, for further inclusion using require() or include().


© «Bitrix24», 2001-2024
Up