Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] Script Concept Critique

Expand Messages
  • Charles K. Clarkson
    ... But you can use a perl program from SSI files. Here s what we did for a recent site update. Our site designer created a template. We split that template
    Message 1 of 5 , Nov 5, 2002
    View Source
    • 0 Attachment
      Greg [mailto:webmaster@...] wrote:
      :
      : First, I don't believe you can use SSI since it has to
      : be embedded in the body of an HTML page which must have
      : all the head tags in place before the body. You could
      : only do it with a cgi-generated page.

      But you can use a perl program from SSI files.
      Here's what we did for a recent site update. Our site
      designer created a template. We split that template
      into a header, footer, and an area for content. Then
      we created a generic SSI file called load_page.shtml.
      Here is that file's outline:

      <html>
      <head>
      <title><!--#echo var="title" --></title>
      <meta name="keywords" content="<!--#echo var="keywords" -->">
      <meta name="description" content="<!--#echo var="description" -->">
      [ snipped lots of other meta tags ]

      <link rel="stylesheet" type="text/css" href="style.css">

      <!-- Insert javascript -->
      <!--#include virtual="/templates/blah.js"-->
      <!-- end of inserted javascript code -->
      </head>
      [ file continues to conditionally load template and content ]
      </html>


      Each page we generate just assigns variables and
      and calls load_page:

      <!--#set var="content_file" value="/bbs/messages.shtml" -->
      <!--#set var="title" value="Open Forum BBS" -->
      <!--#set var="keywords" value="blah, blah, blah" -->
      <!--#set var="description" value="blah blah blah" -->

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

      Unfortunately, we created these "header" files
      statically. I have no idea how to get a dynamic value
      into a "<!--#set". I do know nesting DOES NOT work:

      <!--#set var="description" value="<!--#include virtual="foo.pl"-->" -->

      If you could find or define an environment variable
      that creates a unique value every time it is called, you
      could use something like:

      (Assuming that environment variable is called UNIQUE.)

      <!--#include virtual="/cgi-bin/ssi/create_page.pl?$UNIQUE"-->
      <!--#include virtual="/temp/$UNIQUE.shtml"-->

      Perhaps an environment variable based on the time
      of day or a randomly chosen value might work.


      HTH,

      Charles K. Clarkson
      --
      Head Bottle Washer,
      Clarkson Energy Homes, Inc.
      254 968-8328
    Your message has been successfully submitted and would be delivered to recipients shortly.