Hi,
I have a hash passed from CGI::App to my main template which I
want to pass that hash to another template. I can't
get to work. It is ok if I pass as a scalar but not the hash.
I've got this error:
Error executing run mode 'main': undef error - Template::Stash::XS: get
(arg 2) must be a scalar or listref at
/dssweb/template/events/batch_monitor_main.tmpl line 26. at
/dssweb/apache2/cgi-bin/events/monitor line 9
Any suggestions? thanks, Isarin
[batch_monitor_main.tt]
[% tmpl_dist = 'events/batch_monitor_search_by_district' %]
[% INCLUDE $tmpl_dist
districts = districts %] ### districts is
hash, Isn't 'districts' already a listref?
[batch_monitor_search_by_district]
<form action="" method="post" class="noSpace">
select a district:
<select name="dist">
[% FOREACH district_cd = districts.keys.sort %]
<option value="[%
district_cd %]">[% districts.$district_cd %] [[% district_cd
%]]</option>
[% END %]
</select>
<input type="hidden" name="rm" value="ld">
<input type="submit" value="GO" class="greenButton" style="padding: 0px; margin: 0px; width: 25px" />
</form>
- [Templates] INCLUDE and passing hash as arguments H S
- RE: [Templates] INCLUDE and passing hash as argument... Sergey Martynoff
