> > When in a custom tag how can you reference the query that is
> > located in the callers page...
> >
> > <cfquery name="xxx" datasource="qry_y">
> > select a,b,c
> > from y
> > </cfquery>
> >
> > <cf_MyTag query="xxx">
>
> I posted this at like noon today and I don't know what happend
> to it. Just wrap #Evaluate(attributes.query)# around it.
That's not going to work within a custom tag, because the contents of
Attributes.query in this case will be a string, not a query object. You'd
have to add "Caller." to the string, to get that to happen:
Evaluate("Caller." & Attributes.Query)
If the query is to be referenced within the custom tag as the value for a CF
attribute, it shouldn't be necessary to use the Evaluate function:
<cfoutput query="Caller.#Attributes.Query#">
If the query itself were passed to the tag, like this:
<cf_mytag query="#xxx#">
then you'd be able to reference the query object directly from within the
custom tag - the query object is, I think, passed by reference when doing
this, just like structures are when evaluated within a custom tag attribute.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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