<%doc> First, we get the references to three hashes from the computing component. Then we sort for date or nt field in the LeeRecord object. Then we create the page. <%init> my ($LeeRecordIdHash, $LeeRecordDateHash, $LeeRecordNtHash) = $m->comp('/diglib/mc/LeeRecordData.mc'); <%args> $sortBy=>'Date' <%perl> my @sortedRecords; if ($sortBy eq "Date") { @sortedRecords = sort { $LeeRecordDateHash->{$a} <=> $LeeRecordDateHash->{$b} } (keys %{$LeeRecordDateHash}); } elsif ($sortBy eq "Publication") { @sortedRecords = sort { $LeeRecordNtHash->{$a} cmp $LeeRecordNtHash->{$b} } (keys %{$LeeRecordNtHash}); } elsif ($sortBy eq "BoxAndFile") { @sortedRecords = sort { $LeeRecordIdHash->{$a} <=> $LeeRecordIdHash->{$b} } (keys %{$LeeRecordNtHash}); }
LIST OF COURT RECORDS IN THE COLLECTION

Arranged by <% $sortBy %>

% foreach my $LeeRecord (@sortedRecords) %{ % if ($LeeRecord->get_ty =~ /Court Record/i) % { <& /diglib/mc/LeeDateColumn.mc, LeeRecord => $LeeRecord &> <& /diglib/mc/LeeDescriptionColumn.mc, LeeRecord => $LeeRecord &> <& /diglib/mc/LeeImageColumn.mc, LeeRecord => $LeeRecord &> % } %}
BOX and FILE No.
DATE
TITLE
PAGE IMAGE LINKS
Box: <% $LeeRecord->get_bx %>, File: <% $LeeRecord->get_ff %>

   
     


<& /diglib/mh/footer.mh &>