[Rt-devel] How to Pass an Array to a Template

Todd Chapman todd at chaka.net
Fri Dec 17 11:43:38 EST 2010


You need to pass the array as a reference. Google: perl array references

-Todd


On Dec 17, 2010, at 11:35 AM, Simone Sanna <simone.sanna at tinet.net> wrote:

> Hello List,
> 
> I am trying to pass an array to a template, but I cannot figure out how to make it work.
> 
> With this line I pass the arguments.
> ( $ret, $msg ) = $internalMail_template->Parse(Ticket => $TicketObj, User => $utente, Services => @list_services);
> 
> While I don't know what to do within the template, in order to get the values of @list_services.
> What I need to do is print the values of Services in the template one after the other on a new line.
> 
> Thanks for any help or suggestion.
> 
> Simone Sanna
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


More information about the rt-devel mailing list