Table of Contents

setTitle

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Document Class JDocument Method setTitle Reference setTitle() Never Work in Progress

Sets the title of the page.

Syntax

void setTitle ( $title )

$title string is a string containing the title for the page.

Examples

Set the title for the page.

Example

global $mainframe;

$document =& JFactory::getDocument();
$document->setTitle( 'Joomla! Documentation Test Bed' );

echo "Title: " . $document->getTitle();

Might produce:

Result

Title: Joomla! Documentation Test Bed