RootsWeb.com Mailing Lists
Total: 1/1
    1. [FreeHelp] Headers and Footers -- SSI
    2. Ralph Taylor
    3. Johnny wrote: "There is a way to add Headers and / or Footers: Do your whole set of biographies with a word processor (MS-Word or WordPerfect are good for this), save in PDF format, then upload the PDF files to the web page..." Compared to other means, this seems like poor practice to me; not recommended. Image files (which PDF are) take more bandwidth than the equivalent in HTML-formatted text. It doesn't deal with Caroline's problem of including a footer (or header) in every page without making changes to the pages; you'd have to do something to get the PDF onto each page. To review in more detail what we were discussing before: An easy way to put the same content (text, graphics or both) on every page uses an "include" statement. It's most often used for headers and footers, though it can help for anything that appears on multiple pages. If you change the included file, the changes are reflected on every page it's called. - First, make a text or HTML file with the content to be included. It can be saved as either text (includ1.txt) or HTML (includ1.htm). Even if .htm, it won't need a head section. - Then, put the include statement in your page files, e.g., "file1.shtm". This method is known as "server-side includes" or SSI for short. The standard form of the include statement is <.!--include virtual="path/includ1.htm" --> {without the leading dot} The proprietary FrontPage form is <.!--webbot bot="Include" U-Include="path/includ1.htm" TAG="BODY" --> If you're familiar with HTML tags, you'll recognize these as very similar to a comment -- text that doesn't display except in the source code. But it has a different effect with "include" right after the dashes, the virtual= modifier and the file to be included. The content will be delivered to the viewer as each page is loaded, though it will not take more storage space on either your local version or the remote version of your site. The standard form requires the server to have Perl language installed. Most servers do, though they may require a filename extension of .shtm or .shtml, i.e., Freepages, to signal parsing of the include statement. You may not see the content in your web-designer, but viewers will see it in their browsers and be unable to tell the difference. The FrontPage form requires the server to have FrontPage extensions installed; Freepages does. If you're using the FrontPage application, you will see the content as you design the page and the viewers will also see it. Sounds simple, right? What can go wrong? 1. The server doesn't support SSI or recognize that your page uses it, often because you didn't name the file with a ".shtm". Basically, it thinks the include statement is just another comment not to display. Check that the server supports your form of include and what sort of filename extension it needs. 2. You don't get the statement form correct. Maybe, you put a space after the second dash. Again, the server thinks it's just another comment not to do anything with. Check your include statement for the proper syntax. 3. You get wrong the included filename or the path to it; the server can't find the file. The viewer will see this: [an error occurred while processing this directive] Check, and correct, the filename and path. Make sure the cAsEs agree exactly; it makes a difference to most servers. Includes are a little tricky to get right the first time. After that, you'll love them. For an example, look at http://freepages.misc.rootsweb.ancestry.com/~taylorydna/. The banner graphic and top menu are in one included file, "top_stuff.htm". -rt_/)

    12/04/2011 07:37:00