RE: Custom Tag Question
That is because you did not pass the query to the custom tag, but the name of the query. You can fix this two ways. 1) In your custom tag, do , however, in general, it's not good practice to refer to variables outside the custom tag. 2) Pass the actual query Then your cfquery would be (Notice, no # marks.) === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: John Stanley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 11, 2003 8:29 AM > To: CF-Talk > Subject: Custom Tag Question > > > I am creating a custom tag that will display the results of a > query. I know there are already some out there, but I wanna > do it myself. > > I have an attribute called queryname that i refer to in the > call of the custom tag. > > > > inside the custom tag i refer to it as attributes.queryname > as in the following > > > blah blah > > > I keep getting the following error. > > Attribute validation error for tag cfoutput. > The value of the attribute query, which is currently > "get_users", is invalid. > > The error occurred in C:\CFusionMX\CustomTags\tabledata.cfm: line 20 > > 18 : > 19 : > 20 : > > > I have called the custom tag after the query. Does the custom > tag still execute first? The custom tag appears before the > query in debugging. > > If so what is a competent work around for this problem.? > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
Try something LIKE this inside of your custom tag: blah blah Thanks, André -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: 11 March 2003 14:29 To: CF-Talk Subject: Custom Tag Question I am creating a custom tag that will display the results of a query. I know there are already some out there, but I wanna do it myself. I have an attribute called queryname that i refer to in the call of the custom tag. inside the custom tag i refer to it as attributes.queryname as in the following blah blah I keep getting the following error. Attribute validation error for tag cfoutput. The value of the attribute query, which is currently "get_users", is invalid. The error occurred in C:\CFusionMX\CustomTags\tabledata.cfm: line 20 18 : 19 : 20 : I have called the custom tag after the query. Does the custom tag still execute first? The custom tag appears before the query in debugging. If so what is a competent work around for this problem.? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
Raymond, thank you very much for your help. that was it. -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 9:38 AM To: CF-Talk Subject: RE: Custom Tag Question That is because you did not pass the query to the custom tag, but the name of the query. You can fix this two ways. 1) In your custom tag, do , however, in general, it's not good practice to refer to variables outside the custom tag. 2) Pass the actual query Then your cfquery would be (Notice, no # marks.) === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: John Stanley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 11, 2003 8:29 AM > To: CF-Talk > Subject: Custom Tag Question > > > I am creating a custom tag that will display the results of a > query. I know there are already some out there, but I wanna > do it myself. > > I have an attribute called queryname that i refer to in the > call of the custom tag. > > > > inside the custom tag i refer to it as attributes.queryname > as in the following > > > blah blah > > > I keep getting the following error. > > Attribute validation error for tag cfoutput. > The value of the attribute query, which is currently > "get_users", is invalid. > > The error occurred in C:\CFusionMX\CustomTags\tabledata.cfm: line 20 > > 18 : > 19 : > 20 : > > > I have called the custom tag after the query. Does the custom > tag still execute first? The custom tag appears before the > query in debugging. > > If so what is a competent work around for this problem.? > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Custom Tag Question
Looks like you need to put # around the variable that you are passing to the tag otherwise the tag will see it as a text string. - Original Message - From: "John Stanley" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 11, 2003 7:28 AM Subject: Custom Tag Question > I am creating a custom tag that will display the results of a query. I know > there are already some out there, but I wanna do it myself. > > I have an attribute called queryname that i refer to in the call of the > custom tag. > > > > inside the custom tag i refer to it as attributes.queryname as in the > following > > > blah blah > > > I keep getting the following error. > > Attribute validation error for tag cfoutput. > The value of the attribute query, which is currently "get_users", is > invalid. > > The error occurred in C:\CFusionMX\CustomTags\tabledata.cfm: line 20 > > 18 : > 19 : > 20 : > > > I have called the custom tag after the query. Does the custom tag still > execute first? The custom tag appears before the query in debugging. > > If so what is a competent work around for this problem.? > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
Evaluate is right - but when the evaluation is run, it's run in the context of the custom tag, not the calling template. The tag has no idea what get_data is unless you pass it. In your example below, you did not pass it, so it can't use the query. Did you pass it and just forget to include it in your example below? === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: John Stanley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 12:27 PM > To: CF-Talk > Subject: Custom Tag Question > > > All, > I need to pass a portion of a conditional statement to > a custom tag, like > > > > then in the custom tag I wanna do something like > > > > > then do this > > otherwise do this > > > do this > > > > I have tried: > > > > adding the cfif into the attribute like condition="cfif get_data.summary_id eq 263012"> > and then doing <#Evaluate(attributes.condition)#> > or > <#attributes.condition#> > > no luck, i keep getting an error saying cannot convert the > value "263012 eq 263012" to a boolean. Or sometimes I get an > incomplete cfif tag error. > > I am using MX by the way. > > Is this process just not possible in Cold Fusion? > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Custom Tag Question
What that is doing os converting the "get_data.summary_id" to the actual value before it is past over to the customtag. One being a string value and the other a value. Might try to convert the ID to a VAL within the call to the customtag Not tried it but worth a shot.. >>> [EMAIL PROTECTED] 06/03/03 02:26PM >>> All, I need to pass a portion of a conditional statement to a custom tag, like then in the custom tag I wanna do something like then do this otherwise do this do this I have tried: adding the cfif into the attribute like and then doing <#Evaluate(attributes.condition)#> or <#attributes.condition#> no luck, i keep getting an error saying cannot convert the value "263012 eq 263012" to a boolean. Or sometimes I get an incomplete cfif tag error. I am using MX by the way. Is this process just not possible in Cold Fusion? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
Actually, you have two choices here: you can either use pound signs: (this will dereferenc get_data.summary_id before passing it to the tag) or reference the caller scope inside the tag: . . +---+ Bryan Love Database Analyst Macromedia Certified Professional Internet Application Developer TeleCommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis "Let's Roll" - Todd Beamer, Flight 93 -Original Message- From: Randell B Adkins [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:58 AM To: CF-Talk Subject: Re: Custom Tag Question What that is doing os converting the "get_data.summary_id" to the actual value before it is past over to the customtag. One being a string value and the other a value. Might try to convert the ID to a VAL within the call to the customtag Not tried it but worth a shot.. >>> [EMAIL PROTECTED] 06/03/03 02:26PM >>> All, I need to pass a portion of a conditional statement to a custom tag, like then in the custom tag I wanna do something like then do this otherwise do this do this I have tried: adding the cfif into the attribute like and then doing <#Evaluate(attributes.condition)#> or <#attributes.condition#> no luck, i keep getting an error saying cannot convert the value "263012 eq 263012" to a boolean. Or sometimes I get an incomplete cfif tag error. I am using MX by the way. Is this process just not possible in Cold Fusion? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
I don't think so. That would execute when the tag calls. I _believe_ he wants the condition to be run inside the tag, in this case, every time for every row in a query. === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Bryan Love [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 2:22 PM > To: CF-Talk > Subject: RE: Custom Tag Question > > > Actually, you have two choices here: > > you can either use pound signs: > > (this will dereferenc get_data.summary_id before passing it > to the tag) > > or reference the caller scope inside the tag: > > . > > . > > +---+ > Bryan Love > Database Analyst > Macromedia Certified Professional > Internet Application Developer > TeleCommunication Systems > [EMAIL PROTECTED] > +---+ > > "...'If there must be trouble, let it be in my day, that my > child may have peace'..." > - Thomas Paine, The American Crisis > > "Let's Roll" > - Todd Beamer, Flight 93 > > > > -Original Message- > From: Randell B Adkins [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 11:58 AM > To: CF-Talk > Subject: Re: Custom Tag Question > > > What that is doing os converting the "get_data.summary_id" to > the actual value before it is past over to the customtag. > > One being a string value and the other a value. > > Might try to convert the ID to a VAL within the call to the customtag > > > > > Not tried it but worth a shot.. > > > >>> [EMAIL PROTECTED] 06/03/03 02:26PM >>> > All, > I need to pass a portion of a conditional statement to > a custom tag, like > > > > then in the custom tag I wanna do something like > > > > > then do this > > otherwise do this > > > do this > > > > I have tried: > > > > adding the cfif into the attribute like condition="cfif > get_data.summary_id eq 263012"> > and then doing <#Evaluate(attributes.condition)#> > or > <#attributes.condition#> > > no luck, i keep getting an error saying cannot convert the > value "263012 eq 263012" to a boolean. Or sometimes I get an > incomplete cfif tag error. > > I am using MX by the way. > > Is this process just not possible in Cold Fusion? > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
ahh, then the second suggestion will still work - putting "caller." in front of the query name. +---+ Bryan Love Database Analyst Macromedia Certified Professional Internet Application Developer TeleCommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis "Let's Roll" - Todd Beamer, Flight 93 -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 2:03 PM To: CF-Talk Subject: RE: Custom Tag Question I don't think so. That would execute when the tag calls. I _believe_ he wants the condition to be run inside the tag, in this case, every time for every row in a query. === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Bryan Love [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 2:22 PM > To: CF-Talk > Subject: RE: Custom Tag Question > > > Actually, you have two choices here: > > you can either use pound signs: > > (this will dereferenc get_data.summary_id before passing it > to the tag) > > or reference the caller scope inside the tag: > > . > > . > > +---+ > Bryan Love > Database Analyst > Macromedia Certified Professional > Internet Application Developer > TeleCommunication Systems > [EMAIL PROTECTED] > +---+ > > "...'If there must be trouble, let it be in my day, that my > child may have peace'..." > - Thomas Paine, The American Crisis > > "Let's Roll" > - Todd Beamer, Flight 93 > > > > -Original Message- > From: Randell B Adkins [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 11:58 AM > To: CF-Talk > Subject: Re: Custom Tag Question > > > What that is doing os converting the "get_data.summary_id" to > the actual value before it is past over to the customtag. > > One being a string value and the other a value. > > Might try to convert the ID to a VAL within the call to the customtag > > > > > Not tried it but worth a shot.. > > > >>> [EMAIL PROTECTED] 06/03/03 02:26PM >>> > All, > I need to pass a portion of a conditional statement to > a custom tag, like > > > > then in the custom tag I wanna do something like > > > > > then do this > > otherwise do this > > > do this > > > > I have tried: > > > > adding the cfif into the attribute like condition="cfif > get_data.summary_id eq 263012"> > and then doing <#Evaluate(attributes.condition)#> > or > <#attributes.condition#> > > no luck, i keep getting an error saying cannot convert the > value "263012 eq 263012" to a boolean. Or sometimes I get an > incomplete cfif tag error. > > I am using MX by the way. > > Is this process just not possible in Cold Fusion? > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
Thanks, but I get the error : cannot convert the value "VAL(get_data.summary_id) eq 263012" to a boolean -Original Message- From: Randell B Adkins [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 2:58 PM To: CF-Talk Subject: Re: Custom Tag Question What that is doing os converting the "get_data.summary_id" to the actual value before it is past over to the customtag. One being a string value and the other a value. Might try to convert the ID to a VAL within the call to the customtag Not tried it but worth a shot.. >>> [EMAIL PROTECTED] 06/03/03 02:26PM >>> All, I need to pass a portion of a conditional statement to a custom tag, like then in the custom tag I wanna do something like then do this otherwise do this do this I have tried: adding the cfif into the attribute like and then doing <#Evaluate(attributes.condition)#> or <#attributes.condition#> no luck, i keep getting an error saying cannot convert the value "263012 eq 263012" to a boolean. Or sometimes I get an incomplete cfif tag error. I am using MX by the way. Is this process just not possible in Cold Fusion? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Custom Tag Question
Brian, thanks so much.this worked: -Original Message- From: Bryan Love [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 4:22 PM To: CF-Talk Subject: RE: Custom Tag Question Actually, you have two choices here: you can either use pound signs: (this will dereferenc get_data.summary_id before passing it to the tag) or reference the caller scope inside the tag: . . +---+ Bryan Love Database Analyst Macromedia Certified Professional Internet Application Developer TeleCommunication Systems [EMAIL PROTECTED] +---+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis "Let's Roll" - Todd Beamer, Flight 93 -Original Message- From: Randell B Adkins [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:58 AM To: CF-Talk Subject: Re: Custom Tag Question What that is doing os converting the "get_data.summary_id" to the actual value before it is past over to the customtag. One being a string value and the other a value. Might try to convert the ID to a VAL within the call to the customtag Not tried it but worth a shot.. >>> [EMAIL PROTECTED] 06/03/03 02:26PM >>> All, I need to pass a portion of a conditional statement to a custom tag, like then in the custom tag I wanna do something like then do this otherwise do this do this I have tried: adding the cfif into the attribute like and then doing <#Evaluate(attributes.condition)#> or <#attributes.condition#> no luck, i keep getting an error saying cannot convert the value "263012 eq 263012" to a boolean. Or sometimes I get an incomplete cfif tag error. I am using MX by the way. Is this process just not possible in Cold Fusion? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Custom Tag Question
> 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. >From within the tag, you can reference the query as #ATTRIBUTES.query#. I recommend >copying it to local scope for ease of typing. Sharon DiOrio __ 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: Custom Tag Question
> > 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. > > > > 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
RE: Custom Tag Question
Ok... i did quite follow what you guys were saying, but thanks for trying. I did get it to work like this. Let me know if im an idiot and if this is total kludge. I put Caller.#ATTRIBUTES.Query# into the Query="" on my CFoutput. Calling the tag with this: At 04:15 PM 4/11/2002 -0400, you wrote: > > > 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. > > > > > > > > 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 > > __ 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: Custom Tag Question
This works, but why not use Dave's approach and pass the query as a pointer. It will make more readable code. Also, you don't need to pass the recordcount into the CT. The info is available there. Calling the tag with this: -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: donderdag 11 april 2002 22:45 To: CF-Talk Subject: RE: Custom Tag Question Ok... i did quite follow what you guys were saying, but thanks for trying. I did get it to work like this. Let me know if im an idiot and if this is total kludge. I put Caller.#ATTRIBUTES.Query# into the Query="" on my CFoutput. Calling the tag with this: __ 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: Custom tag question
Thanks for your reply, Larry. ThisTag.GeneratedContent works but not very well in the situation below. Since it fails to encounter any tags it literally passes everything between the opening and closing tags without processing the embedded variable. Hence the pound signs are literally sent to the custom tag template. One way I found to get around this is to wrap tags immediately around the text string like this: Long #var# string with variables embedded... But this defeats the purpose. How can we solve this problem without using additional nested tags inside the custom tags? -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 13, 2000 12:56 PM To: [EMAIL PROTECTED] Subject: Re: Custom tag question Are you looking for thistag.generatedcontent? Larry <<< [EMAIL PROTECTED] 5/12 8:07p >>> For instance if I use a custom tag like this: Long #var# string with variables embedded... How do I capture what is nested within the tags into a variable in custom tag template? Will it be possible to resolve the string so that a variable can be assigned "Long text string with variables embedded..." within the template? Does anyone have any ideas? -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Custom tag question
Are you looking for thistag.generatedcontent? Larry <<< [EMAIL PROTECTED] 5/12 8:07p >>> For instance if I use a custom tag like this: Long #var# string with variables embedded... How do I capture what is nested within the tags into a variable in custom tag template? Will it be possible to resolve the string so that a variable can be assigned "Long text string with variables embedded..." within the template? Does anyone have any ideas? -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Custom tag question
if I understand correctly. The application might be. #itemid# #productname# img src=#productimage# == products.cfm == Our Product Catalog. #thistag.generatedcontent# Hmmm. I could see a use for this. output specified within the body of a tag. Don't think it works though ... (hang on I will try it later), maybe this is a wish list item. Right now you have to correct me if I am wrong specify the variables as caller.varname to pass back to the calling template from the customtag. and the assigned variables would be available throughout the entire document (or even possibly overwrite existing variables. yikes.) I like this wishlist approach. Eric Dawson Alive New Media Looking for free (Canadian) beer, easy contracts, and sleep! Work hard, play harder! "You could try another approach." My token Dave Watts quote (just trying to fit in. :) From: "Leong Yew" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: <[EMAIL PROTECTED]> Subject: RE: Custom tag question Date: Sat, 13 May 2000 14:46:25 +0930 Thanks for your reply, Larry. ThisTag.GeneratedContent works but not very well in the situation below. Since it fails to encounter any tags it literally passes everything between the opening and closing tags without processing the embedded variable. Hence the pound signs are literally sent to the custom tag template. One way I found to get around this is to wrap tags immediately around the text string like this: Long #var# string with variables embedded... But this defeats the purpose. How can we solve this problem without using additional nested tags inside the custom tags? -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 13, 2000 12:56 PM To: [EMAIL PROTECTED] Subject: Re: Custom tag question Are you looking for thistag.generatedcontent? Larry <<< [EMAIL PROTECTED] 5/12 8:07p >>> For instance if I use a custom tag like this: Long #var# string with variables embedded... How do I capture what is nested within the tags into a variable in custom tag template? Will it be possible to resolve the string so that a variable can be assigned "Long text string with variables embedded..." within the template? Does anyone have any ideas? Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Custom Tag Question
>>do I need to do anything special to make sure that the structure is maintained between the start and end tags? No, what you have created in the start section is available in the end section. -- ___ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: [EMAIL PROTECTED] Thanks. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Custom Tag Question
> >>do I need to do anything special to make sure that the structure is > maintained between the start and end tags? > > No, what you have created in the start section is available in the end > section. Excellent! I'm using the custom tag approach to interface with a UDF that I've already written... this way instead of passing a list of fields and a list of values each field change will automagically have it's own entry in the audit log. That'll make searching the audit log a LOT easier later. Thanks for the reply, Hatton --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.680 / Virus Database: 442 - Release Date: 5/9/2004 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Custom tag question
> I have a custom tag that has a start and end tag in cfml. > For example: > > > some text > > > I can't seem to get the "some text" to stop appearing on the > page. I've tried enablecfoutputonly="yes" and in > the tag itself but I still see the text between the tags on > the page. How can I get rid of it? This is on a cfmx 6.1 box, > BTW. If I recall correctly, you will need to set ThisTag.GeneratedContent to an empty string during the end execution mode of your custom tag: Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198621 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Custom tag question
Thanks Dave! That did the trick. I searched the cf docs and google and couldn't find this info. Regards, Howie ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198622 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Custom tag question
Like this? http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec23.htm -Original Message- From: Howie Hamlin [mailto:[EMAIL PROTECTED] Sent: Monday, 14 March 2005 10:05 To: CF-Talk Subject: Re: Custom tag question Thanks Dave! That did the trick. I searched the cf docs and google and couldn't find this info. Regards, Howie ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198625 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Custom tag question
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec22.htm http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec23.htm -Original Message- From: Thane Sherrington [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 April 2005 7:17 To: CF-Talk Subject: Custom tag question I've never seen this done (perhaps I'm looking in the wrong places), but I'd like to create paired custom tags, so I can do something like this: Question text here And have it build an input tag for me, rather than: Is there anyway to do this and parse it in ColdFusion? Would I have to build a parser to do this, and if so, has anyone ever built a parser like this? (It just has to generate the HTML code for the custom tags.) ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203601 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Custom tag question
At 08:33 PM 19/04/2005, James Holmes wrote: >http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec22.htm > >http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec23.htm Thanks. T --- [This E-mail scanned for viruses by Declude Anti-Virus] ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203604 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Custom tag question
Just an FYI, but you can also build nested tags as well: Of course, I've only rarely done this for a real custom tag. On 4/19/05, Thane Sherrington <[EMAIL PROTECTED]> wrote: > At 08:33 PM 19/04/2005, James Holmes wrote: > >http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec22.htm > > > >http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/reusec23.htm > > Thanks. > > T > > --- > [This E-mail scanned for viruses by Declude Anti-Virus] > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203605 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [Custom Tag Question] ThisTag.GeneratedContent...
Got this reply via email, and it does exactly what I needed... Thanks Bryan. >Tuesday, July 17, 2001 1:03 PM My posts don't seem to go through for a long time so I am sending this to you directly. Try saving the content in a variable first. then clear the content. then do your replacement. #ReplaceNoCase(content, 'do NOT', 'do')# Bryan ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: [Custom Tag Question] ThisTag.GeneratedContent...
Simply do: Make sure you do it in ThisTag.ExecutionMode EQ "End". === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] ICQ UIN : 3679482 "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Jamie Jackson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 17, 2001 11:38 AM > To: CF-Talk > Subject: [Custom Tag Question] ThisTag.GeneratedContent... > > > Please tell me if the following is possible, and how: I want to stifle > the output of the area between and . > > Here is a simplified example: I the following output: "Hello World, I > do want to display this sentence." > > ### Calling script ###: > > Hello, World, I do NOT want to display this sentence. > > > ### MyTag.cfm (custom tag) ###: > #ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT', > 'do')# > > Currently, this displays: > "Hello, World, I do NOT want to display this sentence. Hello, World, I > do want to display this message." (Obviously, I don't want the first > sentence displayed.) > > Is this best handled by , or is there > another way that's already built into the custom tag framework? > > Thanks, > Jamie > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: [Custom Tag Question] ThisTag.GeneratedContent...
In the end portion of the tag you need to set ThisTag.GeneratedContent to nothing. Do this after you output what you need to output. At 11:38 AM 7/17/2001 -0400, you wrote: >Please tell me if the following is possible, and how: I want to stifle >the output of the area between and . > >Here is a simplified example: I the following output: "Hello World, I >do want to display this sentence." > >### Calling script ###: > >Hello, World, I do NOT want to display this sentence. > > >### MyTag.cfm (custom tag) ###: >#ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT', >'do')# > >Currently, this displays: >"Hello, World, I do NOT want to display this sentence. Hello, World, I >do want to display this message." (Obviously, I don't want the first >sentence displayed.) > >Is this best handled by , or is there >another way that's already built into the custom tag framework? > >Thanks, >Jamie > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: [Custom Tag Question] ThisTag.GeneratedContent...
> Please tell me if the following is possible, and how: I want to > stifle the output of the area between and . Yes, it's possible. Simply clear the value of ThisTag.GeneratedContent when you're done with it. ### MyTag.cfm (custom tag) ###: #ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT', 'do')# Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: (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/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: [Custom Tag Question] ThisTag.GeneratedContent...
rush answer - sorry. but if I understand correctly... == callingtemplate.cfm This is the Content. #PageContent# == end callingtemplate.cfm == stripcontent.cfm == end stripcontent.cfm This is how I do it. You could even get fancy to specify the variable name to return. Eric From: Jamie Jackson <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: CF-Talk <[EMAIL PROTECTED]> Subject: [Custom Tag Question] ThisTag.GeneratedContent... Date: Tue, 17 Jul 2001 11:38:28 -0400 Please tell me if the following is possible, and how: I want to stifle the output of the area between and . Here is a simplified example: I the following output: "Hello World, I do want to display this sentence." ### Calling script ###: Hello, World, I do NOT want to display this sentence. ### MyTag.cfm (custom tag) ###: #ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT', 'do')# Currently, this displays: "Hello, World, I do NOT want to display this sentence. Hello, World, I do want to display this message." (Obviously, I don't want the first sentence displayed.) Is this best handled by , or is there another way that's already built into the custom tag framework? Thanks, Jamie ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: [Custom Tag Question] ThisTag.GeneratedContent...
Jamie Jackson wrote: > Please tell me if the following is possible, and how: I want to stifle > the output of the area between and . > > Here is a simplified example: I the following output: "Hello World, I > do want to display this sentence." > > ### Calling script ###: > > Hello, World, I do NOT want to display this sentence. > > > ### MyTag.cfm (custom tag) ###: > #ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT', > 'do')# > > Currently, this displays: > "Hello, World, I do NOT want to display this sentence. Hello, World, I > do want to display this message." (Obviously, I don't want the first > sentence displayed.) > > Is this best handled by , or is there > another way that's already built into the custom tag framework? 2 things: - make sure you use thistag.executionmode - reset thistag.generatedcontent to "" Code should look like: ### Calling script ###: Hello, World, I do NOT want to display this sentence. ### MyTag.cfm (custom tag) ###: #ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT','do')# Jochem ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: [Custom Tag Question] ThisTag.GeneratedContent...
Try saving the content in a variable first. then clear the content. then do your replacement. #ReplaceNoCase(content, 'do NOT', 'do')# - Original Message - From: "Jamie Jackson" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, July 17, 2001 10:38 AM Subject: [Custom Tag Question] ThisTag.GeneratedContent... | Please tell me if the following is possible, and how: I want to stifle | the output of the area between and . | | Here is a simplified example: I the following output: "Hello World, I | do want to display this sentence." | | ### Calling script ###: | | Hello, World, I do NOT want to display this sentence. | | | ### MyTag.cfm (custom tag) ###: | #ReplaceNoCase(ThisTag.GeneratedContent, 'do NOT', | 'do')# | | Currently, this displays: | "Hello, World, I do NOT want to display this sentence. Hello, World, I | do want to display this message." (Obviously, I don't want the first | sentence displayed.) | | Is this best handled by , or is there | another way that's already built into the custom tag framework? | | Thanks, | Jamie | | ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists