> > I am trying to write a super simple custom tag but im 
> > running into problems getting CFQuery information into 
> > the custom tag. Is it possible to pass Query data into 
> > a custom tag?
> 
> Yes. The trick is evaluating it before passing it, you can't 
> pass it by reference. It becomes an attribute of the tag.
> 
> <cf_theS query="#getProductList#">
> 
> From within the tag, you can reference the query as 
> #ATTRIBUTES.query#. I recommend copying it to local scope 
> for ease of typing.

I think it's worth pointing out that, when you say: 

query="#getProductList#"

you are passing the query by reference. Queries and structures are passed by
reference, while arrays and simple types are passed by value. When something
is passed by reference, there's only one object, but multiple names that
point to the object.

It's also worth noting that you could reference the query from within the
custom tag without passing it at all, so if you did this:

query="getProductList"

you could reference it within the custom tag like this:

Caller.getProductList

However, I prefer the first approach myself.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to