The below code can be used in any function anywhere in the site. As long as it runs through the normal Joomla system (index.php).
//get the link to the context of the Jdocument (basically getting the $this variable as in context in /templates/[your_template]/index.php) $document = &JFactory::getDocument();
//get the current header information $header = $document->getHeadData();
//make changes $title = 'My new title'; $header['title'] = $title;
//save the header information $document->setHeadData($header);
By PHPin24 @ 2009-11-16 11:34:03
|