-
Notifications
You must be signed in to change notification settings - Fork 401
EDS: Get the item's page count #5523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 3 commits
b2eb0fe
4c2574c
f025019
da520c0
b5ba546
54d7606
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1063,7 +1063,7 @@ function ($data) { | |
| } | ||
|
|
||
| /** | ||
| * Get year of containing record. | ||
| * Get the start page of the item that contains this record. | ||
| * | ||
| * @return string | ||
| */ | ||
|
|
@@ -1099,6 +1099,23 @@ public function getContainerEndPage() | |
| return ''; | ||
| } | ||
|
|
||
| /** | ||
| * Get the page count. | ||
| * | ||
| * @return string | ||
| */ | ||
| public function getPageCount() | ||
| { | ||
| if ($pageCount = $this->extractEbscoDataFromRecordInfo( | ||
| 'BibRecord/BibEntity/PhysicalDescription/Pagination/PageCount' | ||
| )[0] ?? null) { | ||
| return $pageCount; | ||
| } elseif ($pageCount = $this->getItem('Name', 'Pages')) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As usual the API repsonses are a bit of a mystery, so I don't know why the page count sometimes comes in via the BibRecord.../Pagination section like start page, and why it's sometimes in the Items data. I assume the answer is "vendor data 🤷 " but @cwolfebsco can you shed any light? Unfortunately because our EDS templates will display any data that comes from Items, this means that record pages will sometimes display page count and sometimes won't, depending on which field has it. I have a set of configs in my RecordDataFormatter/EDS.ini to hide it from Items and display it via this new method. I don't know if it's generalizable enough to upstream though, even commented out.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @maccabeelevine "vendor data" sounds about right, I am afraid :( Our teams try to match the available data the best they can. While a great benefit to have the original record searched, this is one of the unfortunate side effect. |
||
| return $pageCount; | ||
| } | ||
| return ''; | ||
| } | ||
|
|
||
| /** | ||
| * Returns an array of formats based on publication type. | ||
| * | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, just a fix.