Thank you for your comments.

As i see, any references to variables in your cfcode are resolved before
anything else. In your first example that is not a problem as they�re
assigned a value beforehand. Then you cfoutput the cfcode variable but
unfortunately is taken as a literal string and handled as such without being
parsed again (as the parsing phase has already finished with it!). That�s
why if you look at the HTML source of the output page you get <cfoutput>
tags in it. Had they been parsed for second time (which is what i wanted)
you would had got that error message we all get when we try to nest cfoutput
tags... :-(


----- Mensaje original -----
De: "C. Hatton Humphrey" <[EMAIL PROTECTED]>
Para: "CF-Talk" <[EMAIL PROTECTED]>
Enviado: martes 14 de agosto de 2001 18:25
Asunto: RE: Parsing CFML from a database field


> I don't know if this will help your research, but just for grins I did the
> following:
>
> First I created a template with the following:
>
> <cfset vara='Whatever'><cfset varb=5><cfset varc=vara & ' ' & varb>
> <cfset cfcode = "<cfoutput>#VarA#<br>#VarB#<br>#VarC#</cfoutput>">
>
> <cfoutput>
> Here is the code's output-<br>
> #CFCode#<br>
> </cfoutput>
>
> It gave me the output:
> Here is the code's output-
> Whatever
> 5
> Whatever 5
>
> *BUT* If I move the <cfset> tags inside the variable definition, like so:
>
> <cfset cfcode = "<cfset vara='Whatever'><cfset varb=5><cfset varc=vara & '
'
> & varb><cfoutput>#VarA#<br>#VarB#<br>#VarC#</cfoutput>">
>
> <cfoutput>
> Here is the code's output-<br>
> #CFCode#<br>
> </cfoutput>
>
> it blows up with an undefined VarA.
>
> Hope this helps,
> Hatton
>
> > -----Original Message-----
> > From: Francisco Montes; Spain on Line [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 14, 2001 11:49 AM
> > To: CF-Talk
> > Subject: Parsing CFML from a database field
> >
> >
> > Hi,
> >
> > I know that this kind of problem has already been examined in
> > this list before. However i would like to reach a final
> > conclusion once and for all. :-)
> >
> > I have got several CF templates but they are not stored in files
> > on my server but on fields in a database. I would like to
> > retrieve this CFML content, parse it and eventually produce any
> > output as a normal web page.
> >
> > Now, the only solution I have seen consists in creating a
> > temporary file with that retrieved CFML and cfinclude it to get
> > it parsed. In my case I suspect this operation will increase the
> > response time considerably as IO operations to disk are involved
> > so my question is very simple.... is this really the ONLY WAY of
> > doing this?
> >
> > Any comments will be greatly appreciated...
> >
> > Francisco J. Montes
> >
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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