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

RE: [PBML] An interesting question

Expand Messages
  • Charles K. Clarkson
    ... Well, we are now completely off-topic, aren t we? If you are repeating the same call in 200 different files, you are missing the power of Server Side
    Message 1 of 6 , Mar 30, 2003
    • 0 Attachment
      kjhseka <kjhseka@...> wrote:
      :
      : Thanks you all. The replies were as interesting than
      : the question. So, but, if a 200 pages web site should
      : contain 200 identical SSI calls, the only way to
      : modify the cal it is to rewrite it 200 times?
      :
      : There is not a way to do the call in some header file
      : or, anyway, in an unique file?

      Well, we are now completely off-topic, aren't we?
      If you are repeating the same call in 200 different
      files, you are missing the power of Server Side
      Includes (SSI). Specifically, you are probably
      using "set" poorly. Here is an abbreviated version
      of one of our current site drivers:


      /.htaccess:

      SetEnv SITE_DIR /site
      SetEnv SITE_LOADER site_loader.shtml
      SetEnv SITE_DEFAULTS site_defaults.shtml

      ---------------------------------------------
      /index.shtml: (use all the default site settings)

      <!--#include virtual="$SITE_DIR/$SITE_LOADER"-->

      ---------------------------------------------
      /forum/index.shtml: (override 4 defaults for this page)

      <!--#set var="content_file" value="/forum/messages.shtml" -->
      <!--#set var="title" value="Open Forum" -->
      <!--#set var="keywords" value="Comments from our users" -->
      <!--#set var="description" value="Here's our Forum description." -->

      <!--#include virtual="$SITE_DIR/$SITE_LOADER"-->

      ---------------------------------------------
      /site/site_loader.shtml:

      <!--#if expr="$SITE_DEFAULTS" -->
      <!--#include virtual="$SITE_DEFAULTS" -->
      <!--#endif -->

      <!--#if expr="$section_defaults" -->
      <!--#include virtual="$section_defaults" -->
      <!--#endif -->

      <!--#if expr="$content_defaults" -->
      <!--#include virtual="$content_defaults" -->
      <!--#endif -->

      <!--#if expr="$doctype" -->
      <!--#echo var="doctype" -->
      <!--#endif -->

      <!--#if expr="$xml_doctype" -->
      <!--#echo var="xml_doctype" -->
      <!--#endif -->

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

      <!--#if expr="$meta_tag_loader" -->
      <!--#include virtual="$meta_tag_loader" -->
      <!--#endif -->

      <!--#if expr="$css_loader" -->
      <!--#include virtual="$css_loader" -->
      <!--#endif -->

      <!--#if expr="$javascript_loader" -->
      <!--#include virtual="$javascript_loader" -->
      <!--#endif -->
      </head>

      <!--#if expr="$javascript_body_tag" -->
      <!--#echo var="javascript_body_tag" --><!-- Allows for onload events
      from javascripts -->
      <!--#else -->
      <body>
      <!--#endif -->

      <!--#if expr="$site_header_loader" -->
      <!--#include virtual="$site_header_loader" -->
      <!--#endif -->

      <!--#if expr="$section_loader" -->
      <!--#include virtual="$section_loader" -->
      <!--#endif -->

      <!--#if expr="$site_footer_loader" -->
      <!--#include virtual="$site_footer_loader" -->
      <!--#endif -->

      </body>
      </html>

      ---------------------------------------------
      $section_loader file:

      <!--#if expr="$section_header_loader" -->
      <!--#include virtual="$section_header_loader" -->
      <!--#endif -->

      <!--#if expr="$content_loader" -->
      <!--#include virtual="$content_loader" -->
      <!--#endif -->

      <!--#if expr="$section_footer_loader" -->
      <!--#include virtual="$section_footer_loader" -->
      <!--#endif -->

      ---------------------------------------------
      $content_loader file:

      <!--#if expr="$content_header_file" -->
      <!--#include virtual="$content_header_file" -->
      <!--#endif -->

      <!--#if expr="$content_file" -->
      <!--#include virtual="$content_file" -->
      <!--#endif -->

      <!--#if expr="$content_footer_file" -->
      <!--#include virtual="$content_footer_file" -->
      <!--#endif -->

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

      The webmasters can make changes from the whole
      site level, each section (like all the forum level
      pages), from the content level (like all news
      pages), or for a specific page.


      HTH,

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