Frederic_S has asked for the wisdom of the Perl Monks concerning the following question:
I need to insert $UtilRatioPercent where XX is and have the template read the whole thing as ONE variable which would then look like this for example:# Due to having to iterate through a lot of values, but also needing t +o perform further calculations, I must save the results of the iterat +ion like this: $UserInfo->{"RemainingDays".$_."-".$UtilRatioPercent} = $RemainingTime +; # $_ can either be NEW or ASSIGNED $UtilRatioPercent is variable. # The hash in which this is written is transferred to the template lik +e so: $vars->{'ReturnValues'} = \@ReturnValues; # And then processed in the template as follows: [% FOREACH TimeData IN ReturnValues %] [% TimeData.RemainingDaysNEW-XX %] [% END %]
Anybody know how I can achieve this? The template toolkit documentation doesn't really help and I can't access newsgroups from my companies office.[% TimeData.RemainingDaysNEW-75 %]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Template::Toolkit combining variables?
by Anonyrnous Monk (Hermit) on Jan 05, 2011 at 14:21 UTC | |
|
Re: Perl Template::Toolkit combining variables?
by duelafn (Parson) on Jan 05, 2011 at 13:58 UTC | |
by Frederic_S (Novice) on Jan 05, 2011 at 15:20 UTC | |
|
Re: Perl Template::Toolkit combining variables?
by jethro (Monsignor) on Jan 05, 2011 at 13:13 UTC | |
by Frederic_S (Novice) on Jan 05, 2011 at 13:44 UTC |