- Colorado State University Libraries
- Research Guides
- CSU Library Website Customization
- DSpace Identifier Display FIx
CSU Library Website Customization
- Home
- Exlibris Primo VE Customization
- Exlibris Primo New UI Customization at CSU
- Customize Get It Section
- Moving Send To bar
- Change the hover text for the main menu
- "Expand my results" when there are no results
- Add print journals to E-journals A-Z
- Change "Citation Linker" to "Citation Finder"
- Extra g in front of subject
- Change FRBR setting
- Citation doesn't always pull publisher information
- Availability text change
- Primo Search Logo
- Featured Result Bar
- Resource Recommender
- DOI Search
- BrowZine Primo Integration
- DSpace name change
- Remove "Available at" from Show Only Facet
- DSpace Date Display
- Display MARC 242 field
- Change Brief and Full View Labels
- Customize 5XX Fields
- Add Help Section to Primo Full View
- Add Almetrics to Full View
- Display DSpace Thumbnails in Primo
- Hide Showing expanded results box
- Pre-filter Search for Ebooks
- Create Digital Collections in Primo
- Citation Linker Customization
- SpringShare LibGuides Customization
- Microsoft Office Related
- Colorado Encyclopedia
- Omeka - Creating Avenir Site
Javascript Fix for DSpace Identifier Display
Problem Description
VE combines dc.identifier dc.identifier.url dc.identifier.schema into one string and then attaches an oai to the end. This oai is generated by DSpace import profile and can't be deleted. This OAI is misleading because our DSpace system does not have this OAI.
For example for this DSpace record,VE default display is like the following
Initially we thought we can delete this OAI from Alma since it has MMS ID. We found out that there isn't a corresponding Alma record. If you search for this MMS ID in Alma, you won't find it. Then we thought we might be able to modify the DSpace import profile in VE, so the OAI is not generated. No we can't do that neither. The following is the answer from Exlibris' support
I'm afraid that there is no way currently to disable this or remove this value with Normalization Rules. This will therefore be considered an enhancement. The actual file harvested cannot be modified on the Primo side, only on the DSpace side. However, you cannot remove the identifier field from the header since Primo requires it to identify the record.
Goal
We want display the handle only.
Solution
Use Javascript to find the identifier line and strip other identifiers.
Step 1: Identify tags to modify
1. Load a page, inspect its source code (I use Chrome)
2. Click console tab and type angular.reloadWithDebugInfo()
3. While the inspect code window is open, go back to the VE window and click the MMID, the last item under details section. This will also highlight the MMS ID element in the code inspection window. Go back to the code inspection window, scroll down to find
<prm-service-details-after parent-ctrl="$ctrl"></prm-service-details-after>. This is the name you will use for the JS code.
4. While the <prm-service-details-after parent-ctrl="$ctrl"></prm-service-details-after> is highlighted, go to console tab and type in
angular.element($0).scope().$ctrl
You will see what's under Details section.
Expand the _details arrow and the element with {label:identifier, you will eventually find the identifier line, which is an array.
To test access this identifier line, you can type the following line (make sure change position number for different record. For example, this record's identifier is at _details[9] , values[0] and then values[0].
angular.element($0).scope().$ctrl._details[9].values[0].values[0]
Step 2: Check your DSpace's set up to for identifiers
We use handle.net for dc.identifier.url. You might use different identifiers. If you just want delete oai:your_DSpace_domain:10217/42160 You can use split() function to separate identifers and create an new array. Then use pop() to remove the last element in that new array. Last put the array without OAI back to the _details[9].values[0].values[0]
Step 3: Modify custom.js
Note: The fix only hide other identifiers' display but the source record still contains those information