Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link to external text

Status
Not open for further replies.

knuckle05

Programmer
Dec 17, 2001
247
CA
HI All,

I have some copyright info that I want to put at the bottom of every page.

Is there a way that I can just link to an external file that would carry this text?? And if so, will i be able to place it in the appropriate position in the page?

thx!
 
Hi

You can do this by using a Server Side Include. Also, different server-side languages have their own methods of accomplishing this (<CFINCLUDE> in ColdFusion for example).

With SSI's You can set up a seperate file styled the way you want, and link that to your pages by including the SSI code on any page where you want the content to appear. Keep in mind that your included html will be included in the context of the page where it is included.

good luck! [yinyang] RR
 
<!--#include virtual=&quot;path/file.ext&quot;-->

for something like asp and

<?php include (&quot;path/filename.exe&quot;);?>

for php.

Hope you're able to use one of those.
 
Don't forget that on most servers you'll need to use the .shtml extension for the page that contains server side includes. (This is assuming you're not using a server side scripting language like php or asp.)

You can format the text that's in the external file as long as everything is specified between the
Code:
<body></body>
tags. So, you could create a table in your external file that contained your footer text, format it as you like, or else if you're using a style sheet for the pages you're inserting it in, the footer will take on the formatting specified by the style sheet for that page.

Here's a helpful article about SSI's:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top