PDA

View Full Version : What order do you re-build your website, Is there a better way I wonder?



Hellz
13 Apr 2012, 07:06 AM
Hi this is only a silly question but still you never know some one out there might just have a couple of tips to help out!!

So Im re-doing my website (Im a novice and self taught but I get by) Im just finding this a really long process !

So here is where I am, Ive done my new index page, and it has lots of link to pages through out the site (alot of which are not created yet) this top section will eventually be on the top of EVERY page,

My plan is to create blank pages just so that I can get the link on the home page, then I will use this page to create all the following pages so that the links all carry across

eg:

Home > save as > Contact
Home > save as > delivery
.......................... returns

etc

is this the best route? or is there a better way? xx

Many thanks boys and girls x

Pixel Eden
13 Apr 2012, 11:05 AM
The easiest way to do this is using PHP includes...

So every page on your website will look a little like this:



<?php
include("top.php");
?>
<!-- Changeable content \/ -->

This is the main content this can change for each page etc.

<!-- End of changeable content -->
<?php
include("footer.php");
?>


All you have to do then is put all the links etc to all the different pages inside the documents named in the the pages.

TOP.PHP


<html>
<head>
<title>PHP Code can be used to change this depending on the page...</title>
</head>
<body>
<div id="wrapper">
<a href="page1.php">Page 1</a><br />
<a href="page2.php">Page 2</a><br />
<a href="page3.php">Page 3</a><br />
<hr />
<!-- This is the end of this file and where the document you include this file in will start... -->


Then you can close the document with:

FOOTER.PHP


<hr />
This is my footer that is on every page I include this document on, if I want to change this for the WHOLE website all I have to do is edit the footer.php file and bob's your uncle, every page has the new footer.
</div>
</body>
</html>