spdorsey
01-22-2005, 06:24 PM
Hello
I have an iFrame which contains navigation data. I need to generate several versions of this complex navigation for my layout. I was thinking of using server side includes for the nav content (it's a bunch of DIV layers) so that I would only have to update the navigation data in one place in the future. There are no images in the nav, and it is a small piece of text (about 2000 characters). Are there any hazards to this approach?
Thanks
-------Steve
Example:
http://www.deepa.com/test/test.shtml
no hazards to know of...
if you have the choice between PHP and SSI includes, then perhaps go with the PHP as you may want to advance further in that direction in future.
MaGiCSuN
01-22-2005, 06:45 PM
just put the navigation in a .txt file
and include it using SSI on every page of your whole website using the include coding. That's all :) As long as you include it on the right spot in your whole 'website' nothing should go wrong.
However mostly people divide their site into several sections to also switch from layout to layout faster:
header --> css, html and head tag etc
beginning body --> body tag, beginning of layout
the body --> this shouldn't be a .txt file, since it is different on each page
end body --> end of layout and </body></html> tags
so basically most people have 3 files, or two depending on what you like (i myself like to have my css in a seperate file) The only thing you don't include is the content itself.
header.txt
content here
footer.txt
that could be one of your pages. Then in header.txt you would have <html> until the coding right before the content. Then in footer.txt you'll have the end of hte layout and the last </body></html> tag. For you however i would do it this way:
header.txt
body.txt
content
footer.txt
then in header.txt you'll have your css and heading stuff. In body.txt you'll have your beginning of your layout and your navigation and in footer.txt you have the ending of the layout and the end </body></html> tag.
Basically it's nothing more then dividing your layout into several parts. And when you've done that, you only need to update the .txt files to change a layout or the navigation
Love,
Mirna