Click to See Complete Forum and Search --> : The best way to...


fla5hba5h
08-03-2003, 08:21 PM
What do you think is the best way to make menus and be able to change them on all your pages?
Javascript (.js file), <iframe>, #include, or another method?

Oh also, is there any way to be able to use #include on a computer.
"computer" meaning offline when I'm working on the site?

PeOfEo
08-03-2003, 09:05 PM
You could try putting the menu's in an iframe I guess. Then on the secondary pages call up that iframe and to nav use target="_parent"

pyro
08-03-2003, 09:27 PM
I personally would use PHP includes over any of the methods you mentioned. They are much like SSI includes, but would allow you to use any of the other powerful features that PHP has to offer.

I don't use SSI, so I can't help you much, besides pointing you to http://httpd.apache.org/docs/howto/ssi.html

nkaisare
08-03-2003, 09:43 PM
Javascript is a bad choice. 13% of users disable javascript while browsing.

Iframes is OK, but make sure that you make the navigation available for those who do not have frames-capable browser. Search engine spidering problem seen in frames is applicable to iframes too (if the iframe is used for navigation).

The best method is SSI or other server side method such as PHP. I personally recommend SSI if navigation is the only thing you want to include. But as Pyro mentioned, PHP has other powerful features. Note that SSI can access some similar powerful features using <!--#exec ... --> directive. I quote from the Apache link provided by pyro:
SSI is certainly not a replacement for CGI, or other technologies used for generating dynamic web pages. But it is a great way to add small amounts of dynamic content to pages, without doing a lot of extra work.