Hide Unwanted 856 Links

Developer

CSU Libraries

Original customization: Hiding Links in the Links Section of Full Record Details

Description

Allows institutions to either:

  • entirely hide the Links section for full display records, or,
  • provide an allowed list for which only links matching text values will display

Note: this is likely a temporary way to address hiding 856 links, pending approval of Erin Grant’s NERS request (7893)

Example, before customization:

Links section of Primo full record with two hyperlinks to Pascal Francis and MEDLINE/PubMed

After customization implemented, with “View this record in MEDLINE/PubMed” in allowed list:

Links section of Primo full record with one hyperlinks for MEDLINE/PubMed

System Components

Alma Discovery (VE), Customization Package

Skillset Requirements

Alma Discovery Customization Package, Javascript, CSS

Accessibility

Not tested

Browser Support

Chrome, Firefox, Safari

Mobile Support

iPhone, Android

Implementation

Overview

  • Enable Central Package in your view
  • Option 1: to entirely hide links section, add one line of code to custom1.css
  • Option 2: to provide an allowed list of 856 link texts, add some javascript code to the custom.js file, inside the anonymous function
  • Zip local package, and load to Alma Discovery view.

Steps

Option 1: Hide Links section altogether

In your customization package’s custom1.css, add the following:

#links{display:none;}

Option 2: Preserve the Links section, but provide an allowed list of link text values

In your customization package’s custom.js file, add the following lines of code within the anonymous function (that is, before the closing brackets at the end of the file). Edit the code as necessary to add/remove entries to your allowed list:

app.value('linksToKeep', [
"This item in Worldcat",
"Report a Problem",
"Search Google Scholar for this item",
"Need Help? Ask Us",
"View this record in MEDLINE/PubMed"
]);

Once either of the above options have been added, zip your customization package, load it to Alma Discovery, and save your view. Make sure “Inherit from Central Package” is checked.