I betcha it can be done...
Just brainstorming, don't shout if it fails...

CFFILE a temp .cfm file, with your dynamic code in it.
CFINCLUDE that temp file back in.

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 4:27 AM
> To:   [EMAIL PROTECTED]
> Subject:      RE: Dynamic cfcase generation
> 
> Hi
> 
> I don't think this kind of approach would work. The template won't have
> the
> info it needs to execute the page at the time of compilation.
> You're trying to generate CF on the fly which I've never seen work beyond
> dynamically evaluating variables by their name.
> You could make all the includes dynamic which would be the closest you
> could
> get to dynamic cases
> 
> Probably not the answer you wanted
> 
> Rgds, Tim
> 
> > -----Original Message-----
> > From:       Dave Phipps [SMTP:[EMAIL PROTECTED]]
> > Sent:       Thursday, June 20, 2002 1:00 PM
> > To: Fusebox List
> > Subject:    Dynamic cfcase generation
> > 
> > Hi,
> > 
> > Does anyone know if or how I can generate cfcase statements using a 
> > query?  I have tried:
> > <cfswitch expression=#expression#>
> >          <cfoutput query="myqry">
> >                  <cfcase value="#qryval#"></cfcase>
> >          </cfoutput>
> > </cfswitch>
> > 
> > and doing a cfloop instead but both are not allowed between the 
> > switch.  How can I dynamically generate case statements or do I need to 
> > resort to if/elseif etc?
> > 
> > Thanks in advance.
> > 
> > Dave
> > 
> > 
> > 
> > 
> > ============================================
> > Phipps CF Development
> > Oxford, Oxfordshire.
> > Telephone: +44(0)7718 896696
> > http://www.phipps-cf.co.uk
> > ============================================
> > 
> > 
> > 
> > _____________________________________________________________________
> > This message has been checked for all known viruses by UUNET delivered 
> > through the MessageLabs Virus Control Centre. For further information
> > visit
> > http://www.uk.uu.net/products/security/virus/
> 
> _____________________________________________________________________
> This message has been checked for all known viruses by UUNET delivered 
> through the MessageLabs Virus Control Centre. For further information
> visit
> http://www.uk.uu.net/products/security/virus/
> 
> 

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to