Does it not work for you to do it all in your script, something like..
foreach my $key (keys %HoH) {
foreach my $key2 (keys % {$HoH{$key} }) {
push(@results,"<a href=\"$key\">$key2 <!-- Hidden ID:
$HoH{$key}{$key2}--></a>");
}
}
$template->param(RESULTS => "@results");
Then in the template
<H3><TMPL_VAR NAME="RESULTS"></H3>
I know its a little html in the script, unfortunately.
-Chris
----- Original Message -----
From: "Vince Veggus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 9:33 AM
Subject: [htmltmpl] Skip some Hash keys in <TMPL_LOOP>
> Hello,
>
> Is there a way to skip some keys of the hash if not needed if using
> HTML::Template? Imagine a hash with 10 keys - always printing out some
> hidden stuff or using 10 different hashes with redundant information
> isn't very well programmed...
>
> I use this hash to represent some informations regarding some
> documents
> $template->param(documents => [
> { name => 'doc1', filename => 'fbackup.doc' , id => '12345' },
> { name => 'doc2', filename => 'vabuscopy_dutton.ppt', id => '23456' },
> { name => 'doc3', filename => 'sap_nt_instLAB.pdf', id => '34567' },
> { name => 'doc4', filename => 'reducefs.txt', id => '45678' },
> { name => 'doc5', filename => 'image12.gif', id => '56789' },
> ]);
> In the html template I use
> <TMPL_LOOP NAME="documents">
> <H3>
> <a href="#<TMPL_VAR NAME="name">">•
> <TMPL_VAR NAME="filename"><!-- Hidden ID: <TMPL_VAR NAME="id"> -->
> </a>
> </H3>
> </TMPL_LOOP>
>
> As you can see I hide the ID in an html comment. If the ID is not used
> the script gets unuseable. ErrorMessage: "'id' - this parameter name
> doesn't match any declarations in the template file"
>
>
> --
> Best regards,
> Vince mailto:[EMAIL PROTECTED]
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> Html-template-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/html-template-users
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users