Help with multipage layout
Posted: Sat Aug 18, 2007 11:05 am
Hello, I'm a bit of a nooble at php and am desperatly looking for some help.
Okay what i am basically trying to do is have 2 div's (or tables) 1 for a sub menu and the other for the content. In the content i want to be able to load 2 different tpl(or php) files for example we'll call them page1 & page2.
Page1 would be the default page shown upon visiting the site, but i would like this page to be dumped and page 2 shown in it's place in the event of a user selecting page 2 in the menu (and of course the menu to be able to call page1 back).
Here's what i came up with, but the menu calls the page for the whole browser not just in the "content div"
Thank you for reading my post, i hope you can possibly help me.
Okay what i am basically trying to do is have 2 div's (or tables) 1 for a sub menu and the other for the content. In the content i want to be able to load 2 different tpl(or php) files for example we'll call them page1 & page2.
Page1 would be the default page shown upon visiting the site, but i would like this page to be dumped and page 2 shown in it's place in the event of a user selecting page 2 in the menu (and of course the menu to be able to call page1 back).
Here's what i came up with, but the menu calls the page for the whole browser not just in the "content div"
Code: Select all
$page = $_GET['p'];
if (($page == "1") or ($page =="")) { include('../templates/1.tpl');
} else if($page == "2") { include('../templates/2.tpl');
}