Created by
Jeremy McWilliams, Lewis & Clark College
Description
By default, menu links to non-Primo domains open in a new browser tab. This customization overrides that behavior and opens external links in the same browser tab.
System Components
Alma Discovery (VE), Customization Package
Skill Set Requirements
JavaScript
Accessibility
Not tested
Browser Support
Chrome, Firefox, Safari
Mobile Support
- Android: Does not work. May require the user to update local browser settings.
- iPhone: TBD
Implementation
Overview
- Enable Central Package in view
- Edit custom.js file from local customization package
- Zip package, and load to view via Alma Discovery
Steps
- Turn on inheritance from the Central Package.
- In local custom.js file, include sameTabMenuLinks in the app declaration near the top of the file:
var app = angular.module('viewCustom', ['sameTabMenuLinks', 'anotherCust']);
- Inside the anonymous function in your local custom.js file, add the following code:
/* begin same tab menu links */
app.component('prmTopNavBarLinksAfter', {
template: '<same-tab-menu-links></same-tab-menu-links>'
});
/* end same tab menu links */ - Save your custom.js file, zip your customization package, and upload it to your Primo VE view in Alma Discovery.