On Wed, Feb 27, 2008 at 12:54:49PM -0800, Randal L. Schwartz wrote:
> >>>>> "Bill" == Bill Moseley <[EMAIL PROTECTED]> writes:
> 
> Bill> Want to list ids associated with artists and show the ids in order.
> Bill> The cd objects stringify to its id.
> 
> Bill>     CD ISs: [% artist.cds.nsort.join( ', ' ) %]
> 
> Bill> This works if the artist has more than one CD.  If they only have one
> Bill> then I get:
> 
> Bill>     CD IDs: id
> 
> Bill> Note the string "id".
> 
> What is making artist.cds ?  It needs to return an arrayref,
> not a list.  The magical list return stuff makes a single item
> into a scalar, and multiple items into an array.  That's your breakdown.

Ah, yes.  It's CDBI so in list context it's returning a list not a
an array ref.  I guess that's why I have that as_list() function.

-- 
Bill Moseley
[EMAIL PROTECTED]


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to