Use mets_orderlabel for sorting as fallback.

This happens in case of newspaper (year).

The current workaround of using title_sorting is not working for
documents following the METS application profile as the title and
title_sorting are empty for structtype year.

Only METS ORDERLABEL is set, which is used in the calendar view. But it
is not used in listview. That's why only one year is shown below a
newspaper title (anchor) in single collection view.
This commit is contained in:
Alexander Bigga 2021-03-22 22:38:30 +01:00
parent db7285a2aa
commit 2b6735e234
1 changed files with 3 additions and 1 deletions

View File

@ -1178,10 +1178,12 @@ abstract class Document
$metadata['volume_sorting'][0] = $metadata['year'][0];
}
}
// If volume_sorting is still empty, try to use title_sorting finally (workaround for newspapers)
// If volume_sorting is still empty, try to use title_sorting or mets_orderlabel finally (workaround for newspapers)
if (empty($metadata['volume_sorting'][0])) {
if (!empty($metadata['title_sorting'][0])) {
$metadata['volume_sorting'][0] = $metadata['title_sorting'][0];
} elseif (!empty($metadata['mets_orderlabel'][0])) {
$metadata['volume_sorting'][0] = $metadata['mets_orderlabel'][0];
}
}
}