I agree with Billy. Custom tags offer the most in terms of flexibility and portability. There are some minor gotcha's with them, but as long as you treat them as a descrete function (i.e. it 'kinda' spawns a new thread (no new thread really, but doesn't have access to all the resources the calling page does - unless you code for it), then you should be fine.
If you're familiar with custom tags, then you're well on your way. If not, then you're about to see how flexible CF can be.... <grins> One thing I try to do is to NOT use the REQUEST scope just so a variable is available in a custom tag. That's equivalent to making your variables global, and that can lead to all kinds of other headaches. I prefer passing my information to the custom tag as an Attribute. However, that said, there are always exceptions to the rule... My two cents worth Shawn Grover -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 2:56 PM To: CF-Talk Subject: RE: Coldfusion function An include file is the same thing as the code being inline - so if you set a variable before the include, it's available to the included template. However, for cleaner encapsulation, I'd go the custom tag route. --- Billy Cravens -----Original Message----- From: Mario Martinez R. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 3:51 PM To: CF-Talk Subject: RE: Coldfusion function I got CF4.5 so , I think I can not use UDF's . An include file allow me to pass parameters??. Creating a custom tag could work???. Any other choice?? Thanks for replying Mario --- Shawn Grover <[EMAIL PROTECTED]> escribi�: > Or an include file... if your template makes use of > CF Tags and client > output. UDFs are good in most cases, and include > files are good in others. > Look at your needs and make a judgement call.... > > Shawn Grover > > -----Original Message----- > From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 2:23 PM > To: CF-Talk > Subject: RE: Coldfusion function > > > UDF's my friend. Of course you must have CF5. Check > out cflib.org for some > good examples of user defined functions. > > Kevin > > > -----Original Message----- > From: Mario Martinez R. [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 3:19 PM > To: CF-Talk > Subject: Coldfusion function > > Hi All: > I'm coming today with perhaps a silly question. > I have a complete template and I want to reuse its > functionality . > My question is : Is there anyway to create functions > in coldfusion?? > If so , which is the best option?? > My function would only takes two parameters. > Thanks in advance friends. > Mario > > > Signup for the Fusion Authority news alert and > keep > > up with the latest news in ColdFusion and related > > topics. http://www.fusionauthority.com/signup.cfm > > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > > Archives: > > > http://www.mail-archive.com/[email protected]/ > > Unsubscribe: > http://www.houseoffusion.com/index.cfm?sidebar=lists > > _________________________________________________________ > Do You Yahoo!? > Informaci�n de Estados Unidos y Am�rica Latina, en > Yahoo! Noticias. > Vis�tanos en http://noticias.espanol.yahoo.com > > > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

