PDA

View Full Version : Need some help!


rph105
12-24-2007, 11:20 AM
hey, i didnt know what to call this topic, so i'm gonna try explain as best as i can wht i want to do.

ive got a website and on the sidebar (which is on every page) is a top ten chart, this top ten chart changes every single week, is there a quicker way than updating it page by page, is it possible to save tht part as a html file, and whenever i update that html file all the pages change.

Thanks

Raph

Cary
12-24-2007, 10:46 PM
You can do this using includes such as server-side includes (SSI) or php includes.

rph105
12-30-2007, 11:02 PM
You can do this using includes such as server-side includes (SSI) or php includes.

can't i just use frames, is it that complicated?

neonfluxx
12-30-2007, 11:34 PM
Nope, SSI is the way to go. FRAMES SUCK

Cary
12-31-2007, 05:43 AM
I actually think frames are more complicated.

domedia
12-31-2007, 02:33 PM
can't i just use frames, is it that complicated? Frames is a technique to bring in external HTML documents into your site. It was not uncommon to make websites like this previously (pre-2000), but we know so much better today ;) I think it was davidj that said using frames for layout is like using a toaster to drive a nail in the wall; it works but is soo not the right tool for the job.

rph105
01-02-2008, 10:04 PM
Nope, SSI is the way to go. FRAMES SUCK

ok so server side includes, is that html? how can i learn how to do this?

Cary
01-03-2008, 12:00 AM
Dreamweaver has some info in its help files. Here (http://livedocs.adobe.com/dreamweaver/8/using/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=22_codi7.htm)'s a page from the DW 8 Livedocs.

If you go the SSI route then your pages that use includes need to end in .shtml (unless you change the way the server usually handles this).

So you might have a page called home.shtml with all the code for the page except the sidebar which you would replace with something like this.

<!--#include virtual="sidebar.html" -->

sidebar.html isn't a complete and validating html page. It only contains the sidebar code and whatever html is missing from home.shtml. You don't include any code which already exists within the shtml file.

Imagine the contents of sidebar.html being pasted into home.shtml in place of the include code which then makes home.shtml a complete page.

Jittor
01-03-2008, 03:04 PM
That's what I do rph105. If you have the include code on all the pages you have your top 10 once you update that one file it will update it for every page that that code is on.

I often change our header for the holidays so I use the include code for that as well as other things like current news and stuff. Works great!