[Templates] One more (hopefully the last this week :-)
[prev]
[thread]
[next]
[Date index for 2004/07/21]
I am trying to determine aa the keys adn their values pasted to a
template. This time I did lot of reading -- online and off. Every
example I tried failed leading me to think it can't be done ... famous
last words in the perl world.
I have a CGI that uses code like this to create the HTML document.
my $sut =
Template->new({INCLUDE_PATH =>
['c:/templates']});
my $filename = 'listing.tt';
print header();
$sut->process($filename, \%SUI);
and I'd like to know every key/value pair in %SUI that makes it whether
used in the template or not.
Reading indicates this should work.
[% FOREACH key = SUI.keys %]
* [% key %] => [% SUI.$key %]<br/>
[% END %]
but is doesn't. My other semi-clever ideas didn't work either --
template.keys and compnonent.keys. Is there a special trick to get at the
keys and values SUI?
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] One more (hopefully the last this week :-)
Roderick A. Anderson 00:50 on 21 Jul 2004
|