Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8040 Posts in 1853 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunitySetup and InstallationInstallation and Setup (Moderators: scott, DanO, Marty)Why can this CGI support SSI, but not my others?
Pages: [1]   Go Down
Print
Author Topic: Why can this CGI support SSI, but not my others?  (Read 252 times)
0 Members and 1 Guest are viewing this topic.
CHRIS
Guest
« on: June 05, 2006, 01:47:00 PM »

Hi,

Just wanted to say I love the script, and I recently discovered how to include my header and footer via SSI in the template.  By using:

<!--#include file="../../../../../header.txt" -->

(as documented), it works perfectly.

However, CalendarScript is the ONLY cgi script I have that will do this, and I was wonderin why that was?

I have a CGI search and CGI photo album that use .html (or .shtml) templates the same way CalendarScript does, but when I use the same include statement, nothing shows up in those.  I've tried renaming them to .pl, renaming the templates to .shtml (even though calendar doesn't do that).... but can't get my other CGI's to replicate the way calendar does this.

How is <--#include file=""--> enabled for your script?

Thank you very much for a great app!!!  

Chris

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 227

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: June 06, 2006, 01:48:00 AM »

** CalendarScript is the ONLY cgi script I have that will do this, and I was wondering why that was? **

Because it is not actually SSI (since SSI can't usually be used inside a CGI script) as described in the following documentation excerpt.    

quote:
Include Files

Other files can be included into a template, much like Server-Side-Includes on a typical web server. Since the templates are not actually processed by the web server, but by the calendar program instead, the include commands do not function exactly as SSI's do. However, the syntax is similar in order to be familiar to those who use SSI's.


CalendarScript simulates that particular call SSI call by reading the file manually.

** I have a CGI search and CGI photo album that use .html (or .shtml) templates the same way CalendarScript does **

I doubt that. While they could use templates, I doubt they use them the same way CalendarScript does, containing actual Perl code in them too.

** but when I use the same include statement, nothing shows up in those. **

Since SSI can't usually be used inside  CGI scripts, the script in question would have to be designed to simulate the SSI call. I guess they are not but check their documentation or ask their support.

JFYI

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: