I use a content script on my site which passes the query string to show the website Im linking to.
eg:
www.domain.com/index.php?content=home
I dont know much PHP and i got this script off a friend. I can work it all fine.
However, what i do want to know is, how can i use this so my site doesn't just rely on the layout of index.php ?
Ie, currently, index.php contains all layout and navigation and the individual content files just contain content.
I dont want all my pages to contain the same navigation. I want the index layout used on some pages, but I want another layout containing different navigation template images for other content pages, if that makes any sense.
I tried creating a copy of content.php and naming it something else and calling that from the link, but it doesnt work (doesnt show the content), I assume because content.php is the default and I have to use index.php.
My content script:
<?
if( isset($_GET['content']) ) {
$content = $_GET['content'];
} else {
$content = "home";
}
if ($_GET['content'] == 'index') $content = 'home';
$newcontent = $content . ".php";
include ("$newcontent");
?>
If this makes any sense, I would appreciate some help.. if you need more information or i dont make sense, just ask 🙂
Thanks