<& Template,top=>1 &>
<table border=1><tr><th>Artist</th><th>Title</th><th>Price</th></tr>
% if ($artist) {
% $artist=~s/_/ /g;
% my @ids = @{ $artists{$artist} };
%  foreach my $id (@ids) {
<& tools/cd_details,id=>$id,cds=>\%cds,table=>1 &> 
%  }
</table>

% } else {
%   foreach $artist (sort keys %artists) {
% $artistlink = $artist;
% $artistlink=~s/ /_/g;
<a href="artist?artist=<%$artistlink%>"><%$artist%></a><br>
%   }
% }

<& Template,bottom=>1 &>

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

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