FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Updating pages sitewide

 


xframe
I have just finished setting up the index page for my site in dreamweaver and i was wondering about something. Is there a way to update everypage automatically after i add a new section, ad,image, link on the index page? heres my index for visual purposes http://www.xframe.frih.net/index.htm see if i wanted add a new affiliate do i have to manually edit everypage to include the new affiliate?

I'm new and I don't know what frih$ are but if you want some for helping just tell me how to transer them
mariohs
use php, and modularize your entire site...
simple example:
for your problem, let's suppose you create 2 files: main.php and affiliate.php (this, obviosly is not the way you should do if you decide to modularize your site)
in main.php, you just include your affiliate.php
Code:

<?php require_once('affiliate.php'); ?>


then, everytime you want to include an affiliate, just do it in the affiliate.php page, and everypage, that has included affiliate.php, will get the update...

hope I was clear and helped you Wink
SlowWalkere
If you're using dreamweaver for the site, the easiest way would be to make a template. That template should include all of the info that you want to stay the same on every page (so the basic layout, and presumably the affiliate info). Then, when you create a new page, click on the "Templates" tab at the top of the window and create a new file from your template.

Once you have your files linked to a template, they will automatically be updated every time you change the base template. You edit the template file, perhaps adding an affiliate, save it, and a pop up appears asking you to update all of the connected pages. Then upload them all again to the server and you're set.

This method is better than using a php include if you're site is mostly html and very little php. I usually use includes only for including functions and whatnot instead of including content.

- Walkere
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.