<& 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 = %{mc_comp('data/cds')};
my %genres = %{mc_comp('data/genres')};
</%INIT>

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