Computing.Net > Forums > Web Development > Repeating information on every page

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Repeating information on every page

Reply to Message Icon

Name: oceania
Date: June 8, 2005 at 06:11:50 Pacific
OS: xp
CPU/Ram: 256
Comment:

I have several pages (20+) that need to have a disclaimer on it, as these web pages will be removed within the next year. Is there an easy way of adding the same sentence to each page without having to manually go in each page?

I was thinking of creating a frame and the top frame could have the disclaimer and the bottom frame would have the page the user navigates to...would this work? I just want to make sure what filename I have to specify in the frameset as this page would be different each time depending on where the user navigates to.



Sponsored Link
Ads by Google

Response Number 1
Name: FBI Agent
Date: June 8, 2005 at 06:40:26 Pacific
Reply:

well i hate frames and thinking that there are only 20 identical pages, i would go for PHP. assuming you have PHP on your host...

<?php
// make a file that has the disclaimer on it
$filename = "disclaimer.html";
// insert the file into your page
include_once($filename);
?>

put that code where you want the disclamier to be and save the page as a .php, eg. "index.php"

FBI
Agent
AIM: EliteAssassin187


0

Response Number 2
Name: oceania
Date: June 8, 2005 at 06:53:37 Pacific
Reply:

There's 20+ pages and the content is not identical but I do need that disclaimer on each page in that folder. I should've mentioned thse are cold fusion pages and php would not be an option at this point.


0

Response Number 3
Name: SN
Date: June 8, 2005 at 07:35:31 Pacific
Reply:

You could use a frameset, but coldfusion allows you to do an include statement just like PHP:

cfinclude tag

-SN


0

Response Number 4
Name: oceania
Date: June 8, 2005 at 08:12:26 Pacific
Reply:

Thanks folks. But I would have to go into each page to add that tag which is what I want to avoid.

Anways, I tried frames (which I also do not like) but it serves it purpose in this case. These pages are very content rich with a lot of links and not written properly (i.e. hard coded menu items...argh!) but like I said they will be removed by the end of year.

The only problem with frames is that it opens links which are on different servers within in the same frame/target so a total different website still has that disclaimer. The only way I can think of fixing that is to specify the target for each link...also something I want to avoid.

Thanks again.


0

Response Number 5
Name: Michael J (by mjdamato)
Date: June 8, 2005 at 20:28:30 Pacific
Reply:

If making a frameset and modifying all the links is less work than using an include then I guess the sky isn't blue.

I have not used Cold Fusion, but I have used several other wed development technologies that support includes. It should take you less than 30 minutes to set it all up.

First create the disclaimer as an include file (check Cold Fusion help). Ok, that should take mayby 5 or 10 minutes depending on how competent you are. Then open one of the pages where you need to include the disclaimer, and at the very end of the page content put the necessary code to include the disclaimer. That might take another 5 or 10 minutes the first time since you will need to lookup the method of doing that in Cold Fusion. Then just copy and past the same code at the bottom of each page.

Then whenever you need to modify the disclaimer (or remove it completely) just open the disclaimer file and change it there. You never need to modify the other pages again.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

Connect ColdFusion to Lot... php forms



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Repeating information on every page

One menu on every page www.computing.net/answers/webdevel/one-menu-on-every-page/2328.html

Redundant Information www.computing.net/answers/webdevel/redundant-information/2015.html

Objects moving on web page www.computing.net/answers/webdevel/objects-moving-on-web-page/994.html