Manual:$wgOut
From MediaWiki.org
| Global object: $wgOut | |
|---|---|
| OutputPage object for HTTP response. | |
| Parameters: | none |
| Class: | OutputPage |
| Located in: | OutputPage.php |
[edit] Details
The OutputPage object is output variable that can be modified to change rendering of the page. It encapsulates the entire HTML page that will be sent in response to any server request.
The OutputPage object is used by calling its functions to add text, headers, etc., in any order, and then calling output() to send it all. The OutputPage object also conducts the output encoding.
[edit] Examples
For example, you can add debug information.
global $wgOut; $wgOut->mDebugtext .= "This is debug text";
(If using the default MonoBook skin, you will need to uncomment the line "$this->text( 'debug' );" in MonoBook.php)
Other examples of using $wgOut:
$wgOut->setPageTitle( wfMsg( 'loginsuccesstitle' ) ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); $wgOut->addWikiText( $msg );