Page name changed by links to determine content
Posted: Wed Feb 02, 2011 2:45 pm
Hello all!
I am trying to figure out how to change the name of a page by clicking on a link. I want to have one main page (index) that has my header, content, and footer. I want the content of the page to change depending on what link is clicked. Currently, I have it set up so that each content page has a name, an include for the header, the respective content, and an include for the footer. My navigation is on the header page with certain links and info changing depending on the name of the content page.
Basically I want to do the reverse of this so that my header and footer is on one index page which is calling the content from other files. I've been trying to write a code that changes the name of the page depending on which content you are viewing (active link) so then I can do something like:
Any ideas?
I am trying to figure out how to change the name of a page by clicking on a link. I want to have one main page (index) that has my header, content, and footer. I want the content of the page to change depending on what link is clicked. Currently, I have it set up so that each content page has a name, an include for the header, the respective content, and an include for the footer. My navigation is on the header page with certain links and info changing depending on the name of the content page.
Basically I want to do the reverse of this so that my header and footer is on one index page which is calling the content from other files. I've been trying to write a code that changes the name of the page depending on which content you are viewing (active link) so then I can do something like:
Code: Select all
<?php $thisPage="Page Name Here"; ?> <-- this is what I want the active link to change
<head>
<title><?php if ($thisPage!="") echo "$thisPage"; ?></title>
</head>
<body>
Navgation etc
<?php if ($thisPage=="Page Name Here") include("content.php"); ?>
OR
<?php if ($thisPage=="Page Name Here") echo ' Content Here '; ?>
Footer etc
</body>