Re: conditional include files

by Kukla Fran and Ollie <weblists2001(at)yahoo.com>

 Date:  Thu, 23 Aug 2001 13:16:08 -0700
 To:  hwg-techniques(at)hwg.org
 Cc:  Mark Johnson <johnsonm(at)issaquah.wednet.edu>
 In-Reply-To:  wednet
  todo: View Thread, Original
Not quite accurate.

You can do conditional includes if the logic is performed at the server level.

For example, let's say you have three different greetings, depending upon 
the time of day.  In pseudo code:


<.html>
<.body>

If server time is < Noon
         Process Good_Morning_include
Else if server time < 6pm
         Process Good_afternoon_include
Else
         Process Good_Evening_incude
End If

Rest of page contents here

<./body>
<./html>


Since you provided no specific questions, one cannot offer specific 
answers.  As long as your scripts are written in VBScript, it can be done.


At 12:20 2001-08-23 -0800, Mark Johnson wrote:
>Hi All:
>
>My ASP book tells me that the ASP engine processes all includes before 
>running any scripts.  This prevents the use of conditional include files.
>
>I have one template page that needs to display one of three headers.  A 
>conditional include would have been the best.  My work around will be to 
>add all of the content from the three headers to my template page, and 
>then use an If - else if statement to choose between them.
>
>Seems like there must be a better way.  Suggestions?
>
>Thanks in advance!
>
>Mark


_________________________________________________________
Do You Yahoo!?
Get your free (at)yahoo.com address at http://mail.yahoo.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA