Only very rarely used. Easily migrated in favour of:
Detect main page
Instead of using wgMainPageTitle to compare with wgTitle or wgPagename, use wgIsMainPage instead.
Linking to the main page
For creating an anchor link that will end up on the main page, use wgScript, or title=. It will always resolve to the main page by default.
Getting the main page configuration value
When the configuration value from the current site is really needed. It can be retrieved in one of two ways:
- For gadgets, use the Siteinfo API.
- For extensions, use Title::newMainPage() and bundle its return value with the module that needs it.