Having a little problem with creating the Template System
Posted: Mon Sep 03, 2012 6:58 am
I was watching the "Template System" tutorial for making a template system in a basic small site of four pages and i would like some help please, cause i got a little bit confused .
In the four pages index.php, about.php, products.php and contact.php I have included the same navigation manu like this:
My question is how is going to be in this case the stucture and the check to make sure that if a user types in the url bar for e.g. localhost/fakesite/forum.php (which forum.php doesn't exist at all in my site) will redirect him to the index page, and show him only the four pages that are in the array with the existing pages?
In the four pages index.php, about.php, products.php and contact.php I have included the same navigation manu like this:
<div id="menu"> <ul> <li><a href="index.php" class="current">Home</a></li> <li><a href="about.php">About</a></li> <li><a href="products.php">Products</a></li> <li><a href="contact.php">Contact</a></li> </ul> </div>so all pages are under the root folder fakesite, i haven't any pages folder with pages inside to include in the index page by GET variables.
My question is how is going to be in this case the stucture and the check to make sure that if a user types in the url bar for e.g. localhost/fakesite/forum.php (which forum.php doesn't exist at all in my site) will redirect him to the index page, and show him only the four pages that are in the array with the existing pages?