Forum Moderators: coopster
The static pages appear like this:
case "RugCare": $title = "Rug Care, Cleaning & Maintenance: Little-Persia";
$content_for_layout = $_GET['action'];
break;
case "Gabbeh": $title = "Gabbeh rugs: Little-Persia";
$content_for_layout = $_GET['action'];
break;
case "RugDesign": $title = "Persian & Oriental Rug Layout and Design: Little-Persia";
$content_for_layout = $_GET['action'];
break;
For the dynamic product pages I want to add something dynamically (just now there is no title for them so it uses a default) for example:
case "view_rug": $title = "<some sort of echo or post statement - reference number> - <echo/post - make> Rug <echo/post - length> x <echo/post - width>";
if (!intval($_GET['id'])) {
header("Location: [$base_url...]
die();... there's further code for this source but I don't think it's relevant.
Any ideas on how to phrase it? When I put in code within the " " it's just putting the code in the title...
echo '...
<title> $title </title>
...'; Then the reason it is not dynamically changing the title is, when echoing or printing a variable, you need to concatenate it, like so:
echo '...
<title>' . $title . '</title>
...';