468,738 Members | 2,676 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,738 developers. It's quick & easy.

Smulating SSI set command


I am trying to adapt an SSI content management
system from an Apache server to an IIS 6 server
and I am running into trouble because 'set' is
not supported in IIS SSI.

This is a typical file for a page (/bbs/index.shtml):

<!--#set var="content_file" value="/bbs/messages.shtml" -->
<!--#set var="title" value="Open Real Estate Investor Forum" -->
<!--#set var="keywords" value="Real Estate Investment Club, blah blah
blah" -->
<!--#set var="description" value="American Investors in ..." -->

<!--#include virtual="/templates/load_page.shtml"-->

Then in load_page.shtml(edited for brevity):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>

<!--#if expr="!$title" -->
<!--#set var="title" value="Default title" -->
<!--#endif -->
<!--#if expr="!$keywords" -->
<!--#set var="keywords" value="Default keywords" -->
<!--#endif -->
<!--#if expr="!$description" -->
<!--#set var="description" value="Default description" -->
<!--#endif -->
<!--#if expr="!$content_file" -->
<!--#set var="content_file" value="/home_content.shtml" -->
<!--#endif -->

<title><!--#echo var="title" --></title>

<meta name="keywords" content="<!--#echo var="keywords" -->">
<meta name="description" content="<!--#echo var="description" -->">
Jul 19 '05 #1
2 4425
I would map the .shtml extension to the ASP .dll
Then you get access to all the ASP functionality in your .shtml pages.

Then, if you want "global application" variables, you can do this via ASP's
Application object.

Unfortunately SET still won't work, but you can just use ASP server-side
variables. How this would work with your existing CMS though, I'm not
sure...

Cheers
Ken

"Charles K. Clarkson" <cc*******@htcomp.net> wrote in message
news:vi************@corp.supernews.com...
:
: I am trying to adapt an SSI content management
: system from an Apache server to an IIS 6 server
: and I am running into trouble because 'set' is
: not supported in IIS SSI.
:
: This is a typical file for a page (/bbs/index.shtml):
:
: <!--#set var="content_file" value="/bbs/messages.shtml" -->
: <!--#set var="title" value="Open Real Estate Investor Forum" -->
: <!--#set var="keywords" value="Real Estate Investment Club, blah blah
: blah" -->
: <!--#set var="description" value="American Investors in ..." -->
:
: <!--#include virtual="/templates/load_page.shtml"-->
:
: Then in load_page.shtml(edited for brevity):
:
: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
: <html>
: <head>
:
: <!--#if expr="!$title" -->
: <!--#set var="title" value="Default title" -->
: <!--#endif -->
: <!--#if expr="!$keywords" -->
: <!--#set var="keywords" value="Default keywords" -->
: <!--#endif -->
: <!--#if expr="!$description" -->
: <!--#set var="description" value="Default description" -->
: <!--#endif -->
: <!--#if expr="!$content_file" -->
: <!--#set var="content_file" value="/home_content.shtml" -->
: <!--#endif -->
:
: <title><!--#echo var="title" --></title>
:
: <meta name="keywords" content="<!--#echo var="keywords" -->">
: <meta name="description" content="<!--#echo var="description" -->">
: .
: .
: .
: </head>
:
: <body>
: .
: .
: .
:
: <!--#if expr="$content_header_file" -->
: <!--#include virtual="$content_header_file" -->
: <!--#endif -->
:
: <!--#include virtual="$content_file" -->
:
: <!--#if expr="$content_footer_file" -->
: <!--#include virtual="$content_footer_file" -->
: <!--#endif -->
:
: .
: .
: .
:
: </body>
: </html>
:
: =========================
: Note that <!--#include virtual="$content_file" -->
: is loading a file named in the variable "content_file"
: defined in the called file (/bbs/index.shtml) not in
: this file.
:
:
: I looked at aspfaq.com and couldn't find what I needed.
: I also tried using Server.Execute(), but Variables don't
: seem to hold from one ASP file to the next (which makes
: sense). It looks like IIS 6 doesn't have the same concept
: of a system variable as Apache does.
:
: I thought to add my own custom environment variable,
: but I can find is info on retrieving them, not creating
: my own environment variables. I'm not against re-writing
: the whole thing, I just want to find a quick solution if
: possible.
:
:
: Can anyone see solution here?
:
: My client is on her own dedicated server if there is
: a .dll to add 'set' to IIS SSI.
:
:
:
: Thank You,
:
: Charles K. Clarkson
: --
: Head Bottle Washer,
: Clarkson Energy Homes, Inc.
: Mobile Home specialists.
: 254 968-8328
:
:
:
Jul 19 '05 #2
"Ken Schaefer" <ke*******@THISadOpenStatic.com> wrote:
:
: I would map the .shtml extension to the ASP .dll
: Then you get access to all the ASP functionality
: in your .shtml pages.

I have no idea what this means.
: Then, if you want "global application" variables,
: you can do this via ASP's Application object.

I'll look for a reference to that object. Thanks.
: Unfortunately SET still won't work, but you can just
: use ASP server-side variables.

This sounds like a solution. How do I access these
variables? Can you provide an example?

Thank You,

Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home specialists.
254 968-8328

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by TEK | last post: by
8 posts views Thread by Siemel Naran | last post: by
3 posts views Thread by Eli Criffield | last post: by
34 posts views Thread by Roman Mashak | last post: by
13 posts views Thread by Chris Carlen | last post: by
reply views Thread by czerwww | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.