[Templates] Possible problem w/ Stash
Andy Wardley
abw@andywardley.com
Thu, 28 Mar 2002 08:39:55 +0000
On Wed, Mar 27, 2002 at 03:12:04PM -0500, Drew Taylor wrote:
> I'm finishing up an application here at work and I'm running into a problem
> getting data to print.
Hmmm looks strange. Just to make sure there wasn't anything obvious
going on, I created this template:
[% rate_types => {
'rate_therapy' => 'Therapy',
'rate_hh_aid' => 'Home Health Aide',
'rate_homemaking' => 'Homemaking',
'rate_rn' => 'Nursing (RN)',
'rate_cna' => 'Certified Nursing Assistant',
'rate_lpn' => 'Nursing (LPN)',
'rate_personal' => 'Personal Care Attendant'
}
data => {
'rate_personal' => '16.0000',
'rate_therapy' => '10.0000',
'rate_hh_aid' => '11.0000',
'provide_meds' => 1,
'num_clients' => 400,
'pay_medicare' => 1,
'zip1' => '02420',
...etc...
'submission_date' => '0000-00-00',
'refer_phy_per' => 54,
'network' => 1,
}
-%]
[% FOREACH type = rate_types.keys %]
* [% rate_types.${type} %] : [% data.${type} %] : [% type %]
[% END %]
and the output is, as I would expect:
* Personal Care Attendant : 16.0000 : rate_personal
* Nursing (LPN) : : rate_lpn
* Homemaking : : rate_homemaking
* Therapy : 10.0000 : rate_therapy
* Nursing (RN) : : rate_rn
* Certified Nursing Assistant : : rate_cna
* Home Health Aide : 11.0000 : rate_hh_aid
But that probably doesn't help very much...
A