On the full record display, the links section can contain many repeated and or unused 856 links that institutions may not want to show. Because Primo VE does not allow for configuring the links section display properties, the best solution is to hide the links using CSS and JS in the configuration package. As an alternative, institutions can completely hide the links section using the below mentioned code.
Solution and code provided by: Jessie Cai &Christina Hennessey (Unlicensed)
Hiding Unwanted 856 Links
Modify the
css/custom1.css
file in your desired Primo VE view configuration package. Add the following code:/* hide 856 links - Christina H 4/27/21 */ .hide856 {display: none; }
Modify the
js/custom1.js
file in the same configuration package. Add the following code to the end of the file, BEFORE the final})();
tags.
Note: the following code works by adding the .hide856
style to all links EXCEPT ones with link text that matches thekeep
variable. If your link text is different than the ones listed, modify the values to match your link text. Doing so will exclude those links from being assigned the.hide856
style and thus displaying them in the links section.// hide 856 links - CLH 4/27/21 app.component('prmServiceLinksAfter', { bindings: { parentCtrl: '<' }, controller: function() { angular.element(document).ready(function () { var lNodes = document.querySelectorAll("prm-service-links > div > div"); // if there are any link names that are not showing up in the Links section, add them here // add Finding aid back in CLH 6/14/21; add 'Search for the article title on Google Scholar' 7/22/21 // add text to keep ILL 7/26/21 var keep = ["Display Source Record","Finding aid","Search for the article title on Google Scholar","Request Document via Interlibrary Loan"]; for (var i =0; i < lNodes.length; i++) { var eNode = lNodes[i]; var label = eNode.querySelector("a > span").textContent; if (!keep.includes(label)) { eNode.classList.add("hide856"); } } }); }// end controller });
Upload the new configuration package to your desired view and save/publish the changes.
Hiding the Links Section (Optional)
Modify the
css/custom1.css
file in your desired Primo VE view configuration package. Add the following code:
Note: you do not need to include the above mentioned JavaScript if you want to hide the links section./* Hide Links Section */ #links { display: none; }
Upload the new configuration package to your desired view and save/publish the changes.