So you want to dynamically add attributes to a custom tag? Just use
attributeCollection.

<cfset att = structNew()>
<cfif foo>
        <cfset att.foo = 1>
</cfif>

<cf_goo name="blah" attributeCollection="#att#">

This will pass foo=1 if and only if foo is true.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
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: Abd�sselam_Karata� [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 26, 2003 10:36 AM
> To: CF-Talk
> Subject: custom tag problem
> 
> 
> Hi everyone,
> 
> I have a custom tag where I want to insert attributes and 
> their values to this custom tag using  another string type 
> variable and then execute the custom tag.
> 
> But I could not.
> 
> Here is the code:
> 
> Instead of writing
> <my_custom_tag  attribute1=1 attribute2=2>
> 
> I want to write
> <cfset  string = "attribute1=1 attribute2=2">
> <my_custom_tag  #string#>
> 
> The error says:
> Invalid CFML construct found on line 1 at column 19. 
> ColdFusion was looking at the following text: attribute1
> 
> 
> Thanks in advance.
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
                                

Reply via email to