Veni
Veni

Reputation: 151

In ColdFusion is it possible to pass an array to a custom tag?

I want to pass an array to a custom tag. Is this possible? I have an arry arrayProd. In my cfm I am calling the custom tag :

<cf_cu_show_productcategories thename="#thename#" thenameprod="#thenameprod#" arrayProd="#arrayProd#">

The custom tag :

<cfparam name="attributes.thename" default="">
<cfparam name="attributes.thenameprod" default="">
<cfparam name="attributes.arrayProd" type="array" default="">

Using this arrayProd in de custom tag results in 'Variable ARRAYPROD is undefined'.

Upvotes: 2

Views: 186

Answers (1)

Bernhard D&#246;bler
Bernhard D&#246;bler

Reputation: 2117

Default attribute should be default="#[]#"

Upvotes: 5

Related Questions