Why store the "<cfinclude template=" in the db?  Just store the actual
template name in the db.

-----Original Message-----
From: Robert Long [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 4:08 PM
To: CF-Talk
Subject: pulling CF code from a db an having that code parse in page


Here's one...

I would like to allow a user to insert cf code, namely <cfinclude
template="SomeTemplate.cfm"> into a
database field. Then I would like to have another template query the
database and pull out the code
and parse the cf code and pull in the template before sending it to the
browser.

What am I overlooking?

Here's some of the code I've tried.

<cfquery datasource="#variables.dsn#" name="qryAdditionalCode">
        select txtAdditionalContent ....
</cfquery>

<cfoutput>
        #qryAddtionalCode.txtAdditionalContent# <br><br>
        #evaluate(de(qryAddtionalCode.txtAdditionalContent)#
</cfoutput>

Neither one of the outputs works as desired, nor do they cause an error but
it doesn't display the contents
of the requested include file. Rather, if I view the source in the browser,
I see 
<cfinclude template="SomeTemplate.cfm"> 

Any suggestions?

Thanks in advance,
Robert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to