Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Here is the header.php:

<head>
<meta charset="utf-8">
<title></title>
<meta name="Description" content="" />
<!doctype html>
<html lang="">
</head>


$META_PAGENAME = ' Home';
$BODYCLASS = 'home-page';
$pageTitle = 'Hello, Welcome to our e-boutique - example.com';
include('inc/header.php');
?>



$META_PAGENAME = ' Search';
$BODYCLASS = 'other-page';
$pageTitle = 'Here is the list of "[Product_list]";
include('inc/header.php');
?>

My issue is with the product_list. I'd like to the search page title to be customized with the added name of product_list (which is dynamically generated based on search results).
So, the variables of [product_list] could be: cameras, watches, phones,..

Any idea how to do it?

Thanks
Posted
Comments
Kornfeld Eliyahu Peter 8-Feb-15 4:27am    
Where is the variable containing the string you want to add to your title?
Member 11435979 8-Feb-15 5:28am    
As it's a dynamic website, the variables are dynamically generated (based on query from the home page).
If from the home page search section, the user write for cameras, I'd like the result page title to display: 'Here is the list of Cameras' The variable changes based on search text. Of course, all search text variables are in the database in order to display results.
Kornfeld Eliyahu Peter 8-Feb-15 5:33am    
You probably mean that the value of the variable is dynamic, but the variable itself?!
In any case you did not answered my question - dynamic or static - where the variable is?!
Member 11435979 8-Feb-15 5:46am    
[Product_list] is the variable i'd like to declare (it's supposed to be $Product_list). My issue is to declare it by getting the same value as for the search result.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900