> I am trying to write a custom tag that
> will, among other things, add an element
> to an array whose name can vary from situation
> to situation.  This array is always stored as a
> session variable.  I have been trying to pass
> the name of the array as a character string
> and then manipulate it in the custom tag
> with no luck.

You can just pass the array itself to the custom tag, rather than passing
its name, then trying to evaluate a reference to the calling page from
inside the custom tag.

<!--- calling page --->
<cfset myarray = ArrayNew(1)>
....
<cf_foo arrayvar="#myarray#">

<!--- inside cf_foo custom tag --->
<cfloop index="i" from="1" to="#ArrayLen(Attributes.arrayvar)#">
....

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

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to