ssi / php includes
You will learn to worship SSI. What is it, you ask? Well, SSI [Server Side Includes] is a wonderful little thing that lets you change the menu on all of your pages by changing it on one page. Once your sites get bigger, it becomes really handy. Now, there are many confusing tutorials for SSI out there, and I finally found one I could understand. But, because I love you, I will make a nice simple one.First, create a page called "left.[htm, html, shtml, etc.] Using whatever document type you prefer. Then, put the content that you want in the left menu in it. Do the same with a document called "right.[whatever]" And put the things that you want in your right column in it. Now, put this code where your left menu is. That is, where ever the content that is in your menu right now is, that is where this code belongs:
Then, where ever the right column of your page is, place this code:
This should enable you to change the document named left/right to include whatever you want in the corresponding columns.
php includes
PHP includes is a code that performs the same task as SSI. However, this code is much more versatile. For example, you can use PHP includes on <div> tags, not just their content. Here's the easy code to use PHP includes:Note: This only works on PHP pages, so it must have a .php extension. However, the page you're including can be HTM, HTML, PHP, TXT, CSS, or any other text file type.
Back