SSI: An Amazing Tool to Put and Change Dynamic Content in Minutes!

    December 2, 2003

You have a five page web site.Now you want to add an extra link to your links at the footer area of five pages.No problem…

Open them in your html or Note pad and add that link.You might be finished in 5-10 minutes.

What if you have 10 or 50 page web site?

It will take forever to edit a link on all of the 50 pages.

Here comes SSI.

How can you do that?

Step 1 :

First design a lay out for your web pages.Here is an example lay out. You can see one header area, one footer area,two side bars.

Design it in a way you like.If you want one more area below header, you can include something like ‘header2’ etc.

Step 2 :

Now you have to create a template for your web pages.

That template should consists of four SSI tags(in this case).One for header area, one for footer area and two for the two side bars.

When I finish my html code for the above example it looks like:

I will explain this code.You should have minimum knowledge of html before going in to details of the code.SSI tags are shown in green color.

  • Line 1: Your title
  • Line 2,3: Your metatags
  • Line 4: link to css file if you are using one.If you don’t use it don’t bother of keeping it.But using CSS also makes easy to update the site.
  • Line 5,6: head and body tags
  • Line 7: Space to give you clarity
  • Line 8-11: Table with it’s attributes and SSI tag for header area
  • Line 12: Break tag
  • Line 13: Space for clarity
  • Line 14-18: First part(25%) of second table with SSI tag for sidebar1.htm
  • Line 19-25: Second part of the second table,space where you can paste the text of the page
  • Line 26-27: Third part of the second table with SSI tag for sidebar2.htm
  • Line 28,29: Break tag and space
  • Line 30-33: Third table with SSI tag for footer.htm
  • Line 34: Body and html tags
  • Tips in creating these templates:

    You can keep footer.txt, header.txt, sidebar.txt etc., instead of footer.htm, header.htm and sidebar.htm.

    1.Always left the background color white.Because once you put up the 50 web pages and you don’t want that back ground, you have to update those 50 pages.So all the colors you want to keep, put them in those files which you include thru SSI tags.

    2.Seperate the html code with some clear spaces so that you won’t be confused after looking at it.

    3.Always you have to name these web pages where you keep SSI tags as ‘.shtml’ extentions.This is because, you are telling the server that these are the pages that have to do some work on them before sending to the browser.

    4.Always keep the files that you include by SSI in root directory and use the ‘virtual’ SSI tag to include these files.(‘exec’ method in not necessary because, you are just including the files not executing the some CGI script).

    5.If you want second bar in future but not now, you can add second bar as usual and upload some empty file with sidebar2.htm name.In future you can alter your sidebar2.htm.If you don’t upload any file that was included in SSI tag, you will get ‘[error occurred in processing this directive]’ message on html page.

    Step 3 :

    Now you create the files that have to be included in the SSI tags and upload them to your root directory.Put the template anywhere you want.

    All you have to do is pasting the text in the appropriate place. (here it is in the second part of the second table)

    If you want to add a link or delete a link you can open footer.htm or sidebar1.htm and do it.Your whole site reflects the changes.

    Click here to sign up for FREE B2B newsletters from iEntry!

    Radhika Venkata
    Subscribe to ‘iNet Marketing Ezine’ which is completely focused on
    Internet Marketing. Receive FREE Ebooks with Resale rights!
    FREE Ecourse :: 30 days Solid work out to increase your online profits!