Dynamic Page-Titles with Joomla-SMF

By fiLi • Mar 6th, 2007 • Category: Joomla

To get a dynamic pagetitle in Joomla-smf, edit your template’s index.php and add the following right after the <head> :

<?php
global $sc, $context, $settings;

if (!defined(’SMF’)){
require (”administrator/components/com_smf/config.smf.php”);
require ($smf_path.”/SSI.php”);
}

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

mysql_select_db($mosConfig_db);
?>
<?php
if ($context['page_title']) echo “<title>”.$context['page_title'].”</title>”
?>

Tagged as:

Leave a Reply