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/cf-talk@houseoffusion.com/ > 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 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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
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/cf-talk@houseoffusion.com/ > 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 __ 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
RE: Coldfusion function
if you are using CF 5, you can create a UDF like this function myFunction() { } -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/cf-talk@houseoffusion.com/ > 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Coldfusion function
The answer to your question is yes. Maybe. What version of Cold Fusion Server are you running your pages through? Cold Fusion Server 5.0 has UDF (User Defined Functions) which perform just like functions in any language. But what you are talking about with the template sounds more like you want to reuse the entire template, not just a little snippet of code. There are two main approaches in CF for this. Including the file (CFINCLUDE) or creating a custom tag/module (CF_NEWTAGNAME or CFMODULE). If you go the include route, you should check out a development methodology called Fusebox. It helps a lot to keep these pieces and parts seperated and easy to find and reuse. HTH Jerry Johnson >>> [EMAIL PROTECTED] 04/10/02 04:18PM >>> 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/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists _ Do You Yahoo!? Informaci=n de Estados Unidos y AmTrica Latina, en Yahoo! Noticias. Visftanos en http://noticias.espanol.yahoo.com __ 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
RE: Coldfusion function
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/cf-talk@houseoffusion.com/ > 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 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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
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/cf-talk@houseoffusion.com/ > > 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Coldfusion function
Mario, It sounds like you want to go the custom tag route. Kevin -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/cf-talk@houseoffusion.com/ > > 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
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/cf-talk@houseoffusion.com/ > > 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 > > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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
RE: Coldfusion function
Yes , I think it's the other option in CF4.5 . Checking my book , it sounds custom tags to be good enough. I let you know if I got grab in the way. Thanks all friends Mario --- Kevin Schmidt <[EMAIL PROTECTED]> escribió: > Mario, > > It sounds like you want to go the custom tag route. > > Kevin > > > -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/cf-talk@houseoffusion.com/ > > > 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 > > > > > > > > > __ Get the mailserver that powers this list at http://www.coolfusion.com 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
RE: Coldfusion function
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 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/cf-talk@houseoffusion.com/ > > 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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
(Complete) ColdFusion Function reference?
Is there a complete CF function reference in existence? I seem to remember seeing something online at some time in my ColdFusion developing history, but I can't find one when I need too, and I'm very intrigued to see what #CFusion_VerifyMail# does. (If it's even accessible, I found in by using GetFunctionList.) I have a few books, but none have a complete list with examples... Tyler ~~ Get the mailserver that powers this list at http://www.coolfusion.com 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
RE: (Complete) ColdFusion Function reference?
Check it out at the House of Fusion (http://www.houseoffusion.com/) ... 4th link down. -Original Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 2:14 PM To: CF-Talk Subject: (Complete) ColdFusion Function reference? Is there a complete CF function reference in existence? I seem to remember seeing something online at some time in my ColdFusion developing history, but I can't find one when I need too, and I'm very intrigued to see what #CFusion_VerifyMail# does. (If it's even accessible, I found in by using GetFunctionList.) I have a few books, but none have a complete list with examples... Tyler ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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
Re: (Complete) ColdFusion Function reference?
Look at the front of House of Fusion (www.houseoffusion.com). I have a complete function list there. The function your asking about queries a mail server to see if it is operating properly. The attributes are in the list. At 02:13 PM 12/12/01, you wrote: >Is there a complete CF function reference in existence? I seem to remember >seeing something online at some time in my ColdFusion developing history, >but I can't find one when I need too, and I'm very intrigued to see what >#CFusion_VerifyMail# does. (If it's even accessible, I found in by using >GetFunctionList.) I have a few books, but none have a complete list with >examples... > >Tyler > ~~ 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
RE: (Complete) ColdFusion Function reference?
Yep Seen it before for version 4 but not looked at it since 5 came out. -Original Message- From: Semrau, Steven L Mr RDAISA/SRA [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 2:12 PM To: CF-Talk Subject: RE: (Complete) ColdFusion Function reference? Check it out at the House of Fusion (http://www.houseoffusion.com/) ... 4th link down. -Original Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 2:14 PM To: CF-Talk Subject: (Complete) ColdFusion Function reference? Is there a complete CF function reference in existence? I seem to remember seeing something online at some time in my ColdFusion developing history, but I can't find one when I need too, and I'm very intrigued to see what #CFusion_VerifyMail# does. (If it's even accessible, I found in by using GetFunctionList.) I have a few books, but none have a complete list with examples... Tyler ~~ Get the mailserver that powers this list at http://www.coolfusion.com 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