CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Insert page headers via SSI?



Sep 8, 2000, 11:01 AM

Post #1 of 3 (2380 views)
Insert page headers via SSI? Can't Post

On my site, I've got a fairly complicated layout that is uniform throughout my site. And since I've got a largish number of pages, when I want to update part of the layout it usually takes a long time.

Is there a program out there that lets me, say, put the entire layout of the page in a text file, and then have an SSI call at the top of each page that will automatically fill in the layout dynamically? That way I can edit the layout once, and have the changes reflected on all pages automatically.

Possibly it may be required to actually have two different scripts: one for everything ABOVE the page content, and one for everything BELOW the page content. That's the way the UBB program does it: there is a header field, and there is a footer field, and it gets split into two separate parts like that.

Thanks in advance for any help you can provide!



Sep 8, 2000, 12:51 PM

Post #2 of 3 (2380 views)
Re: Insert page headers via SSI? [In reply to] Can't Post

I don't think you need a Perl program to do that.

Create the html for everything above the content. Save it.

Create the html for everything below the
content. Save it.

then, an shtml file looks like this:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

<!--#include file="top_layout.html" -->

<H1> Hello World! </H1>

<!--#include file="bottom_layout.html" -->

You may even be able to configure your web server to handle .htm files on the site as
.shtml files and then no one is any wiser that you are using shtml or to confuse them if they forget to put in the .shtml extention.




Sep 8, 2000, 3:57 PM

Post #3 of 3 (2380 views)
Re: Insert page headers via SSI? [In reply to] Can't Post

Wow, it's that easy? Now I kinda feel stupid. Oh well. Thanks a lot for the info! I'll go try it now.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives