Home Page
Notice that the products page is in a different folder than the home page and about-us page (that will come into play after we create the header and footer includes).
- Create an 'includes' folder, then create header.inc.php and footer.inc.php inside the folder.
- Slice out everything up to, and including, the opening div tag that has an id of 'content'. Put this code into the header.inc.php include file.
- Slice out everything from the closing div tag that has the id of 'content' to the bottom of the page. Put this code into the footer.inc.php include file.
- Replace the duplicate code in the about-us and products page, use the include files instead.
- Note that the PHP paths to the include files in the products page is different.
- Note the title and desc are the same for all pages.
- Add a $page_title and $page_desc variable to each page, and use it in the header include file.
- Note that the links don't work in the products page (inlcuding css and js links).
- Create config.inc.php file
- Create PROJECT_DIR const in the config file
- include the config file in each of the web pages.
- Fix links in the header to use PROJECT_DIR.
- Move the project to a different folder and update the PROJECT_DIR.
- OPTIONAL - Experiment with $_SERVER['DOCUMENT_ROOT'] and create INCLUDES_DIR.
- OPTIONAL - Use semantic tags (header, footer, article, maybe aside).
- OPTIONAL - Create a side bar include file (or a few of them) and plug them into the pages.