From 657d33306b58b63d06bedc66cc2510d66727cda6 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Mon, 22 Oct 2012 11:35:37 -0400 Subject: [PATCH] Add dynamic custom page title support --- include/class.osticket.php | 9 +++++++++ include/staff/header.inc.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/class.osticket.php b/include/class.osticket.php index 44f414367..86d206f21 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -30,6 +30,7 @@ class osTicket { var $warning; var $message; + var $title; //Custom title. html > head > title. var $headers; var $config; @@ -168,6 +169,14 @@ class osTicket { return $this->headers; } + function setPageTitle($title) { + $this->title = $title; + } + + function getPageTitle() { + return $this->title; + } + function getErrors() { return $this->errors; } diff --git a/include/staff/header.inc.php b/include/staff/header.inc.php index 4d9475356..a349cb3c6 100644 --- a/include/staff/header.inc.php +++ b/include/staff/header.inc.php @@ -4,7 +4,7 @@ <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" /> - <title>osTicket Staff Control Panel</title> + <title><?php echo ($ost && ($title=$ost->getPageTitle()))?$title:'osTicket :: Staff Control Panel'; ?></title> <!--[if IE]> <style type="text/css"> .tip_shadow { display:block !important; } @@ -29,7 +29,7 @@ } ?> </head> -<body onunload=""> +<body> <div id="container"> <div id="header"> <a href="index.php" id="logo">osTicket - Customer Support System</a> -- GitLab