I think what you are in search of is the request scope. Without more context about what you are trying to do though I may be assuming wrong. If you call your query that you want to modularize into a custom tag but your id variable comes to each page a different way, all you have to do is set the id to request.id and it will be available throughout any custom tags in that request. If you intend to start using custom tags a lot, the request scope is invaluable. jon ----- Original Message ----- From: "Frank" <framar at interlog.com> To: <thelist at lists.evolt.org> Sent: Sunday, January 14, 2001 8:04 PM Subject: [thelist] CF: form. Url. Attributes. A better way? > > I'm trying to create scheme where everything is pretty modular, > almost object oriented. I break my queries apart from the logic, so > that any number of display modules can call to them. What I tend to > end up doing it this: > > <cfif IsDefined("URL.ID")> > <cfset TheID = "#URL.ID#"> > > <cfelsif IsDefined("Form.ID")> > <cfset TheID = "#Form.ID#"> > > <cfelseif IsDefined("Attributes.ID")> > <cfset TheID = "#Attributes.ID#"> > > </cfif> > > Use: #TheID# > > This seems rather clumsy to me. Does anyone have a better of getting > the correct scope for a variable without having to redefine them each > time on every query? > -- > > Frank Marion Loofah Communications > frank at loofahcom.com http://www.loofahcom.com > > --------------------------------------- > For unsubscribe and other options, including > the Tip Harvester and archive of TheList go to: > http://lists.evolt.org Workers of the Web, evolt !