In this lesson, you:
- Review a site with layout, images, and animated navigation.
- See how to create a complete PHP template system for this site.
- Understand the productivity wins this gives us.
- Inserting files with paths in them – to images, links to pages, whatever – can break your site.
- You can fix it with root relative paths, but this makes your site less portable.
- A better way it to create a variable on each page, giving the path from that page to the root of the site. Add that variable in the inserted files.
- This gives you a big productivity win. You can change an entire site just by changing one inserted file.
- How to use PHP to insert a file into the HTML output, using the
- How to use a file path to insert the same file in pages that are spread out across a directory tree.