Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Solution and code provided by: Jessie Cai &Christina Hennessey (Unlicensed)

  1. Modify the css/custom1.css file in your desired Primo VE view configuration package. Add the following code:

    Code Block
    /* hideHide 856 links - Christina H 4/27/21Links */
    .hide856 { display: none; }

  2. 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 the keep variable. If your link text is different than the ones listed, modify the keep 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.

    Code Block
    languagejs
    // hideHide 856 links - CLH 4/27/21Links
    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// inIf thelinks Linksare section,not addshowing themup, here
                    // addmodify Findingthe aidkeep backvalues in CLH 6/14/21; add 'Search forto match the articledesired title on Google Scholar' 7/22/21
      link text
                 // 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
    });

  3. Upload the new configuration package to your desired view and save/publish the changes.

...