Smulating SSI set command

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charles K. Clarkson

    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_fi le" 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="descriptio n" 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="!$keyword s" -->
    <!--#set var="keywords" value="Default keywords" -->
    <!--#endif -->
    <!--#if expr="!$descrip tion" -->
    <!--#set var="descriptio n" value="Default description" -->
    <!--#endif -->
    <!--#if expr="!$content _file" -->
    <!--#set var="content_fi le" value="/home_content.sh tml" -->
    <!--#endif -->

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

    <meta name="keywords" content="<!--#echo var="keywords" -->">
    <meta name="descripti on" content="<!--#echo var="descriptio n" -->">
  • Ken Schaefer

    #2
    Re: Smulating SSI set command

    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" <cclarkson@htco mp.net> wrote in message
    news:vijlk0nbrr io97@corp.super news.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_fi le" 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="descriptio n" 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="!$keyword s" -->
    : <!--#set var="keywords" value="Default keywords" -->
    : <!--#endif -->
    : <!--#if expr="!$descrip tion" -->
    : <!--#set var="descriptio n" value="Default description" -->
    : <!--#endif -->
    : <!--#if expr="!$content _file" -->
    : <!--#set var="content_fi le" value="/home_content.sh tml" -->
    : <!--#endif -->
    :
    : <title><!--#echo var="title" --></title>
    :
    : <meta name="keywords" content="<!--#echo var="keywords" -->">
    : <meta name="descripti on" content="<!--#echo var="descriptio n" -->">
    : .
    : .
    : .
    : </head>
    :
    : <body>
    : .
    : .
    : .
    :
    : <!--#if expr="$content_ header_file" -->
    : <!--#include virtual="$conte nt_header_file" -->
    : <!--#endif -->
    :
    : <!--#include virtual="$conte nt_file" -->
    :
    : <!--#if expr="$content_ footer_file" -->
    : <!--#include virtual="$conte nt_footer_file" -->
    : <!--#endif -->
    :
    : .
    : .
    : .
    :
    : </body>
    : </html>
    :
    : =============== ==========
    : Note that <!--#include virtual="$conte nt_file" -->
    : is loading a file named in the variable "content_fi le"
    : 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
    :
    :
    :


    Comment

    • Charles K. Clarkson

      #3
      Re: Smulating SSI set command

      "Ken Schaefer" <kenREMOVE@THIS adOpenStatic.co m> 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



      Comment

      Working...