<& Template,top=>1 &>
<h1>CD-ME category: <%ucfirst($cat)%></h1>
<table border=1><tr><th>Artist</th><th>Title</th><th>Price</th></tr>
%  foreach my $id (@{$genres{$cat}}) {
% # with tabling built-in
<& tools/cd_details,id=>$id,cds=>\%cds,table=>1 &>
% # or without
%# <& tools/cd_details,id=>$id,cds=>\%cds &> <a href="add_cd?id=<%$id%>">Buy</a><br>
%  }
</table>
<& Template,bottom=>1 &>

<%INIT>
my %cds = %{$m->comp('data/cds')};
my %genres = %{$m->comp('data/genres')};
</%INIT>

<%ARGS>
$cat=>undef
</%ARGS>
