Hi,

I'm trying to build, evaluate & execute custom tags on the fly by creating
a string ( e.g. "<cf_myTag param1='foo1' param2='foo2'>" ). After toying
with the concept, I'm wondering if a) There's something I simply do not
grasp and/or b) This is generally a silly idea and I need to get on with
the business of writing some case statements.

Here's a few tests & results (using CF 5.0):

<!--- assign.cfm is a working template --->
<cfset templateString = "<cf_assign>">
<cfoutput>
        templateString = #templateString#<br>
        #templateString#
</cfoutput>

This returns an empty string and doesn't run assign.cfm. As CF doesn't
have escape characters, my guess is that CF is "blowing off" a tag that
doesn't exist (failsafe thingy?).

So then I break out evaluate() whose inner workings I best comprehend
through monkey motion (trial and error):

<cfset templateString = "<cf_assign>">
<cfoutput>evaluate(#templateString#)</cfoutput>

This evaluates to nothing, null, nada... So I change the hash-marks:

<cfset templateString = "<cf_assign>">
<cfoutput>#evaluate(templateString)#</cfoutput>

And CF returns an error (evaluating the _expression_: <cf_assign>) ... at least this is the string that I intended - but not the
result.

Any input appreciated,

Thanks, Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to