<sheepish grin> it works now.

thx all


long story below, if you're interested :-)


What doesn't work is to pull out part of the if-else into a template. 

<!--- start --->

<cfloop index="myIndex" from "1" to "xxx">
        <fset getDate="-" & myIndex>
        <cfset weekDay = "#DateFormat(DateAdd("d",getDate,Now()),"mmm dd,
YY")#">
        <cfset list_holidays = "20011212,20011213,20011217">  

        <cfif #DayOfWeekAsString(DayOfWeek("#weekDay#"))# EQ "Saturday" OR
#DayOfWeekAsString(DayOfWeek("#weekDay#"))# EQ "Sunday">
                <br>

        <cfelseif #list_holidays# CONTAINS
#DateFormat(DateAdd("d",getDate,Now()),"yyyymmdd")#>


                        <cfoutput>
                        <font
color="##999999">#DateFormat(DateAdd("d",getDate,Now()),"mmmm dd,
yyyy")#</font><br>
                        </cfoutput>

// snip

<!--- end --->


What works is to put the <cfset ...> into the include. Why didn't work
earlier? Because there were other mistakes :-)
But, if I put the <cfelseif ...> into the include then the page breaks
apart. Of course, there's no need to do so in this case.

Thx for your input. Your responses helped me find the error.


gilbert midonnet



-----Original Message-----
From: Joseph Thompson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 3:03 PM
To: CF-Talk
Subject: Re: cf include file


I take it you have allready checked this link then:
http://www.cfhub.com/html/include/index.cfm

The CFINCLUDE tag is one of the simpler ones and any template you point 
it
at will be included (and proccessed)

What trouble are you having exactly?  Perhaps a path error?


> I've looked around (Forta, Micah Brown, CFHub and others) and cannot 
find
a
> way to include a file that would be processed by the server. I would 
like
to
> include a list of holidays that I could use in more than one file.
>
> ie.
> <cfif holiday>
> do this
> <cfesle>
> do that
> </cfif>
>
> <cfinclude template> doesn't work. Is there anything that does?
>
> TIA
>
>
>
>
> 
------------------------------------------------------------------------
--
--
> ----------------------------------------------------
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally
> privileged information. No confidentiality or privilege is waived or 
lost
by
> any mistransmission. If
> you receive this message in error, please immediately delete it and 
all
> copies of it from your
> system, destroy any hard copies of it and notify the sender. You must 
not,
> directly or indirectly,
> use, disclose, distribute, print, or copy any part of this message if 
you
> are not the intended
> recipient.
>
>
>
> 

______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to