%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. %doc> <%init> my ($LeeRecordIdHash, $LeeRecordDateHash, $LeeRecordNtHash) = $m->comp('/diglib/mc/LeeRecordData.mc'); %init> <%args> $sortBy=>'Date' %args> <%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}); } %perl>
BOX and FILE No.
|
DATE
|
TITLE
|
PAGE IMAGE LINKS
|
Box: <% $LeeRecord->get_bx %>, File: <% $LeeRecord->get_ff %>
|
<& /diglib/mc/LeeDateColumn.mc, LeeRecord => $LeeRecord &>
<& /diglib/mc/LeeDescriptionColumn.mc, LeeRecord => $LeeRecord &>
<& /diglib/mc/LeeImageColumn.mc, LeeRecord => $LeeRecord &>