Why are my page titles not appearing ?
I am building a small site for a local mechanic which I am using as a test bed for the CMS I am developing using Framework Builder and all the content for the various "pages" is pulled in via Framework Builder.
This is the code I am using
<?php
/*
Load Site Application File
----------------------------------------------------------
*/
require_once('_inc/application.php');
/*
Set $includedOnPage Variable to ensure plugins cannot be
viewed outside the context of this page
----------------------------------------------------------
*/
if(!(isset($includedOnPage)) || (!(empty($includedOnPage)))) $includedOnPage = true;
?>
<?php
require_once( "webassist/framework/library.php" );
require_once( "webassist/framework/framework.php" );
?>
<?php require_once('Connections/connDB.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$urlParam_rsMenuLevel1 = "-1";
if (isset($pathInfo[0])) {
$urlParam_rsMenuLevel1 = (get_magic_quotes_gpc()) ? $pathInfo[0] : addslashes($pathInfo[0]);
}
mysql_select_db($database_connDB, $connDB);
$query_rsMenuLevel1 = sprintf("SELECT slug FROM tbl_pages WHERE slug = %s", GetSQLValueString($urlParam_rsMenuLevel1, "text"));
$rsMenuLevel1 = mysql_query($query_rsMenuLevel1, $connDB) or die(mysql_error());
$row_rsMenuLevel1 = mysql_fetch_assoc($rsMenuLevel1);
$totalRows_rsMenuLevel1 = mysql_num_rows($rsMenuLevel1);
$urlParam_rsMenuLevel2 = "-1";
if (isset($pathInfo[1])) {
$urlParam_rsMenuLevel2 = (get_magic_quotes_gpc()) ? $pathInfo[1] : addslashes($pathInfo[1]);
}
mysql_select_db($database_connDB, $connDB);
$query_rsMenuLevel2 = sprintf("SELECT slug FROM tbl_pages WHERE slug = %s", GetSQLValueString($urlParam_rsMenuLevel2, "text"));
$rsMenuLevel2 = mysql_query($query_rsMenuLevel2, $connDB) or die(mysql_error());
$row_rsMenuLevel2 = mysql_fetch_assoc($rsMenuLevel2);
$totalRows_rsMenuLevel2 = mysql_num_rows($rsMenuLevel2);
if((!($totalRows_rsMenuLevel1 == 0)) && ($totalRows_rsMenuLevel2 == 0)){
$WA_level1_1288197075810 = new WA_Include("_plugins/category-pages/category-page.php");
require($WA_level1_1288197075810->BaseName);
$WA_level1_1288197075810->Initialize(true);
}
if(!($totalRows_rsMenuLevel2 == 0)){
$WA_level2_1288197258702 = new WA_Include("_plugins/subcategory-pages/subcategory-page.php");
require($WA_level2_1288197258702->BaseName);
$WA_level2_1288197258702->Initialize(true);
}
?>
<?php
# Fire the WebAssist Framework Builder Dynamic Plug-in only if all of the above recordsets are empty
if(($totalRows_rsMenuLevel1 == 0) && ($totalRows_rsMenuLevel2 == 0)){
?>
<?php
if(true){
// WebAssist Framework Builder Dynamic Plug-in: $WA_page_1288220530067
switch(isset($pathInfo[0])?$pathInfo[0]:""){
case "":
$WA_page_1288220530067 = new WA_Include("_plugins/home-page/home.php");
break;
case "index":
$WA_page_1288220530067 = new WA_Include("_plugins/home-page/home.php");
break;
case "about":
$WA_page_1288220530067 = new WA_Include("_plugins/about-us-pages/about-us.php");
break;
case "contact":
$WA_page_1288220530067 = new WA_Include("_plugins/contact-pages/contact-us.php");
break;
case "legal":
$WA_page_1288220530067 = new WA_Include("_plugins/legal-pages/legal-page.php");
break;
case "forbidden":
$WA_page_1288220530067 = new WA_Include("_plugins/error-pages/page-forbidden.php");
break;
default:
$WA_page_1288220530067 = new WA_Include("_plugins/error-pages/page-not-found.php");
break;
}
if(isset($WA_page_1288220530067)){
require($WA_page_1288220530067->BaseName);
$WA_page_1288220530067->Initialize(true);
}
// End: WebAssist Framework Builder Dynamic Plug-in: $WA_page_1288220530067
}
?>
<?php
# End fire if all recordsets are empty
}
?>
and this is the code in the title tag
<title><?php echo((isset($WA_level1_1288197075810))?$WA_level1_1288197075810->Title:"") ?><?php echo((isset($WA_level2_1288197258702))?$WA_level2_1288197258702->Title:"") ?><?php echo((isset($WA_page_1288220530067))?$WA_page_1288220530067->Title:"") ?></title>
The title tag content appears just fine from the dynamic plugin but not the two static ones e.g. contact/ the title tag content appears but mot/ it doesn't
What am I doing wrong ?