Yes, but only if the code consists of variables and/or functions. Lets
assume you have the following code in a DB
The time is now #now()#.
Now if you do a query and that line is now contained in the variable
qQuery.text then all you have to do in order to 'evaluate' it is:
#Evaluate('#qQuery.text#')#
Now this looks like it breaks every rule I state about evaluation and pound
signs but that's on purpose. The inner pound signs say that what you have is
a variable and the quotes say that the variable is part of a text string.
First thing to happen is that qQuery.text will be turned into its value.
You'll now have
#Evaluate('The time is now #now()#')#
The evaluate() function will now try and evaluate the TEXT STRING that you
have there. As its evaluating it'll see a function and turn it into its
value. The final result is
The time is now 1/11/71/ 6:43:20
or whatever for the time value. A little hack based on knowledge of how
evaluation works. Pity you can't do this with tags.
> I'm working on a pretty nice system for content management here.
>
> The problem I'm having, is I would like to be able to store CF templates
> in my database, and have CF parse them. The reason for this is that I've
> written custom tag interfaces to various "elements" that site admins can
> use to do things like insert images in an article without resorting to
HTML.
>
> Is there a way to do this, besides writing a temp file to disk and then
> including it via CFINCLUDE?
>
> It would be really nice to have a ParseCFML function which would take a
string
> and treat it like input. Leave non-CFML content alone, and execute any CF
> content.
>
> Can this be done?
>
> TIA
>
> -Tim
>
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists