Link to home
Start Free TrialLog in
Avatar of akkha
akkha

asked on

edit one page and update the less

I have about 30 html pages (the top part of all page are the same but the bottom part are different). If one day I wanted to change a top part, I have to edit all 30 pages.

I would like to ask what can I do to edit only one page and the less are update?

PS: top part include image and text message.
    I usually use Dreamweaver.

Thanks in advanced.
Avatar of aarontwc
aarontwc

Well if you are using dreamweaver then you are lucky :))

Simply because, they have this template based environment.

You can play around with it and get some help from dreamweaver's help file about this thing.

Thanks
Aaron
ASKER CERTIFIED SOLUTION
Avatar of bvinson
bvinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If your site is using one already:
* Server side scripting language with an include function
Else if your server supports it:
* SSI (Server Side Includes)
Else if you care about your visitors, search engine position, etc:
* An HTML Preprocessor such as The Dolt
Else if you don't care about visitors and search engines:
* Frames / Iframes

http://www.allmyfaqs.com/faq.pl?Include_one_file_in_another has links to details on these.
Dont use frames. They are evil. The creator of frames should be put over an ant hill naked, right next to the as*holes who created pop up windows.
frames can be good. they're just abused. they should be optional and OFF be default. (ex. instead of loading the same images from the server every time the user loads a page i load them once into a frame and save my bandwidth for mp3s)

bvinson's on the right track, go for a server-side solution. i've just begun to convert my website to be more like a template as well but i chose php to add the header and footer. it's also really easy to add things like a last modified line and stuff like that. (it is equally as simple if not easier with includes as well) one thing i'm doing on my site (which currently uses frames) is making it so that if the user wants frames they can turn them on and if not turn them off (without managing 2 versions of the site) and this also comes in handy when someone surfs in from an external link. as of now they'll just get "lost" at my site but with php, frames will be off be default so they will get the headers and navigation bit with an option to turn frames on.

www.no-eff-eks.com will be updated in the next couple of weeks and will all be using php and css to make my life much easier.
> instead of loading the same images
> from the server every time
> user loads a page i load them once
> into a frame

That's the job of a cache, you certainly shouldn't need frames for that.
yeah you're right but it does save bandwidth. some people turn caching of their browsers off or constantly refresh etc. plus it usually won't make a huge difference if your images are properly saved but for some people every mb counts. (luckily i have 25gb a month =))

also there are other reasons like not wanting to change the code on each page if you change one thing in the header or navigation thing and not everyone wants to give php or javascript or anything a try. that was just an example of one reason someone might have for using frames.
akkha
Have you tried using find and replace which is the Edit menu, this way you could change just one of your pages cut and paste the code into the find and replace dialog box and update the rest of the pages sitewide.
The SSI is probably the best solution because the site would be easier to maintain and update, searches for information are not messed up by frames, users would not have functionality impaired by frames.

For updating and maintaining the site, the SSI allows information that is common through out a site, such as a header or footer to be included in the page. When this file is updated, then the whole site is updated at once. The webmaster would not have to go and update numerous pages. This is a great time saver for large sites.

For sites with a search engine, frame sites may have difficulty being able to have data found.  Many times only the default page (index.htm for example) registered, and the spider used to get the information could have difficulty in finding all the relevant information on the site.

Many users have difficulty with frames. For instance, if you print from a frame, if you dont click on the frame you want, you can get a print of the wrong thing, such as the navigation links.  Also some browsers don't navigate well with frames. Many times the back and forward buttons are rendered useless.

For these reasons, SSIs are better for code reuse than frames. If the hosting site does not allow for frames, then the include file could be rewritten as a java script file, and included as a script file. I tried this and it worked well for a site that did not allow SSIs.
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I may recommend DELETE unless it is clear
   to me that it has value as a PAQ.  Silence = you don't care
</note>

Cd&
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
split bvinson and dorward

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
Comment from expert accepted as answer.  dorward, look for your question in this topic area.

Computer101
E-E Admin