Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    New UI Customization - Best Practices

    If you are working with Primo VE and not Primo, see Primo VE Customization - Best Practices.


    In order to provide users with the best experience in Primo discovery, Ex Libris carried out an extensive user study that included the following tasks to help redesign the Primo user interface:
    • Analyzed search logs
    • Conducted surveys of librarians during workshops
    • Interviewed users at different academic levels and from various countries and disciplines 
    During the design and development of the new interface, accessibility was tested as well as its responsiveness on several devices to make sure that the new design met the goals based on the results of the user study.
    Because every library has its own needs and brand, we have implemented a new customization framework that allows customers to tap into predefined hooks for each UI component, thus allowing them to customize each component as needed.
    In order to ensure a quality user experience and optimal system performance, we encourage customers to test every change that they make for both accessibility and responsiveness in their staging environments before uploading any packages to their production environment.

    Additional Resources

    The following resources may be helpful in the customization of the new Primo UI:

    Inspecting Web Elements with Your Browser

    Most Web browsers provide developer tools that allow you to inspect the currently-loaded HTML and find specific elements on a page. In most browsers, you can either click F12 or right-click the page and then select the Inspect Element option.

    In order to customize the new UI, you should be familiar with the following: CSS, HTML, JavaScript, and AngularJS. Depending on your experience with each of these languages and frameworks, you will be able to perform more complex customizations.

    For Alma-Primo configurations, the labels and CSS inside the View It and Get It sections on the Full Display page are controlled by Alma, not Primo. For more details, see Modifying Display Labels and Branding the Delivery Tabs.


    Full Display Page - Get It Section

    The following procedure shows how to use the browser's inspect tool to locate the code table used to define a label in the new UI.

    To locate a label on the page:
    1. On the page that you want to inspect, press F12.

    2. Click the inspect item button (#1) and then click the label (#2) that you want to modify. Each component should highlight as you move the cursor over the item.


      Inspection Brief Results Page
    3. In the HTML tab, you should see the label and its corresponding code (#3). If you do not see a translate parameter, you can instead search for the label’s description on the All Code Tables page.

    4. On the All Code Tables page in the Back Office (Primo Home > Advanced Configuration Wizard > All Code Tables), either search for the code or description (the actual display label).

      The following figure shows an example of a search for a code:


      Code Search Example

      The following figure shows an example of a search for a code:


      Label Search Example

    Using the UI Customization Package Manager

    The Customization Package Manager allows you to upload and manage customization packages, which allow you to brand and further customize the Primo UI. For more information on the tool, see UI Customization Package Manager.
    To ensure that a customization package integrates properly with Primo, the package must contain the following folders:
    • css – This folder contains the custom1.css file, which is where you can include your CSS rules. These rules override corresponding rules in the default CSS.
    • img – This folder contains all customized images for the new Primo UI. To ensure that the correct image appears in the Primo UI, ensure you use the same file name as the original.
    • js – This folder contains the custom.js file, which includes your scripts.
    • html – This folder contains all customized HTML files for the new Primo UI. The home_en_US.html file allows you to customize the area of the page below the search box on the Primo Home page. For more information, see Home Page.
    New Primo Home Page
    • The system will not use content inside <script> tags.
    • Since this code will be nested inside the main HTML code, it is recommended to wrap this code with a <div> tag (insets of the <html> tag).
    • To support other languages, you can create a new HTML file with the relevant language code and locale. For example: home_fr_FR.html.
    • For details on configuring Alma's View It and Get It services, see Branding the Delivery Tabs.
    To create a customization package:
    1. Open the UI Customization Package Manager (Primo Home > Primo Utilities > UI Customization Package Manager).
    2. Select the institution (on-premises configurations only) and the view that you want to customize.
    3. Click Download to download the template package.
    4. Unzip the ZIP file.
    5. If using the template file, change the name of the root folder to your view’s code.
    6. Add your customized images and CSS. You must retain the file structure and names of files that you are overriding. Refer to the following sections for details on how to brand and make simple changes to your view:
    7. Zip the Configuration package folder.

      For Windows users, we recommend using a compression tool such as 7zip or Winrar instead of Windows Send to > Compress folder to avoid upload errors.


      For Mac users, use the following procedure to zip and remove any hidden .DS_Store files:

      1. Open the Terminal application under Applications > Utilities.

      2. Move to the parent directory of the folder that you want to compress. For example: cd /Users/<user name>/<parent folder>

      3. Enter the following command to compress the file: zip –r <target file>.zip <My_View> - x "*.DS_Store"

    8. Open the UI Customization Package Manager (Primo Home > Primo Utilities > UI Customization Package Manager).
    9. Select the institution (on-premises configurations only) and the view that you want to customize.
    10. In the Upload package section, click Choose File to select the zipped package that you just created or modified for that view and institution.
    11. Click Upload to upload your package to the server.
    12. Click Deploy to activate your changes in the Primo UI.
    13. Refresh your view in the Web browser and test your changes prior to uploading the changes to the production server.

    Customizing Image Files

    Any of the out-of-the-box images can be customized by creating or modifying a view’s package, placing the customized image under the img folder, uploading the updated package to the server, and then deploying the package. Here are some of the commonly customized images for the purpose of branding:
    • library-logo.png – Contains the library logo.
    • favicon.ico – Contains the favicon.
    • icon_<resource_type>.png – Contains the image for the specified resource type <resource_type>. For example: icon_audio.png

    CSS Components and Customizations

    This section identifies the major CSS components for each page of the new UI and provides an example of how to move the facets to the left side of the page using CSS.

    Home Page

    This section identifies the major components of the Home page.


    Home Page Components
    1. .prm-primary-bg.prm-hue1, prm-search-bar.prm-hue1, prm-spinner.prm-hue1.overlay-cover.light-on-dark:after, prm-topbar .top-nav-bar{}
    2. .prm-primary-bg, prm-search-bar, prm-spinner.overlay-cover.light-on-dark:after{}
    3. view_code/html/home_en_US.html
    To initially display drop-down lists for the view's default tab and search scope in the search box, include the tab parameter as follows in the new UI's URL:
    To initially display a drop-down list for a specific search scope, include the search_scope parameter as follows in the new UI's URL:

    Brief Results Page

    This section identifies the major components of the Brief Results page.
    Brief Results Page Components
    1. .alert-bar{}
    2. md-content,{}
      1. .section-title {}
      2. .section-content .md-chips .md-chip strong{}
      3. .md-autocomplete-suggestions .suggestion-scope, .text-italic{}
      4. .link-alt-color, .section-title prm-icon {}
    3. prm-search-result-list .results-title {}
      Brief Result Item Components
    4. prm-brief-result-container .list-item-primary-content {}
      1. prm-brief-result .item-title{}
      2. prm-brief-result .item-detail{}
      3. .item-expanded .secondary-content-holder .md-tab:nth-child(2), .item-expanded .secondary-content-holder md-tab-item:nth-child(2){}
      4. .item-expanded .secondary-content-holder .md-tab:nth-child(3), .item-expanded .secondary-content-holder md-tab-item:nth-child(3) {}
      5. .item-expanded .secondary-content-holder .md-tab:nth-child(4), .item-expanded .secondary-content-holder md-tab-item:nth-child(4) {}
      6. .item-expanded .secondary-content-holder .md-tab:nth-child(5), .item-expanded .secondary-content-holder md-tab-item:nth-child(5) {}
      7. .item-expanded .secondary-content-holder .md-tab:nth-child(6), .item-expanded .secondary-content-holder md-tab-item:nth-child(6) {}
      8. .item-expanded .secondary-content-holder .md-tab:nth-child(7), .item-expanded .secondary-content-holder md-tab-item:nth-child(7) {}
      9. .item-expanded .secondary-content-holder .md-tab:nth-child(8), .item-expanded .secondary-content-holder md-tab-item:nth-child(8) {}

    Hiding the Sign-In Link

    To hide the "Sign in to get complete results and to request items" link:
    .alert-bar {

    Changing the Color of the Versions Link

    To change the color of the "See all versions" link:
    1. Log on to the Primo Back Office.
    2. On the All Code Tables page (Primo Home > Advanced Configuration Wizards > All Code Tables), edit the Results Tile code table under the Front End subsystem.
    3. Change the description of the code to the following:
      <font color="green">See all versions</font>
    4. Save and deploy your changes.

    Full Record Page

    This section identifies the major components of the Full Record page. For details on configuring Alma's View It and Get It services, see Branding the Delivery Tabs.
    Full Record Page Components
    1. prm-full-view prm-brief-result-container{}

    Hiding the Virtual Browse Service

    Virtual Browse is automatically created, and it is based on the callnumber field in the Browse section of the PNX record.

    To hide the Virtual Browse shelf:
    1. Edit your customization package or create one if you have not already done so. For more information, see Using the UI Customization Package Manager.

    2. Add the following lines to your CSS file:

      1. #virtualBrowse {display:none;}
      2. button[aria-label="Virtual Browse"]{display:none;}
    3. Upload and deploy your modified customization package.

    Upper Menu

    This section identifies the major components of the Upper Menu.
    Upper Menu Components
    1. view_code/img/library-logo.png
    2. .layout-align-end-center { }
    3. prm-topbar .md-button:not(.md-icon-button) {}

    Hiding the Language Menu

    To hide the language menu:
    prm-change-lang {
      display: none;

    Disabling Automatic Capitalization of Main Menu Links

    To disable the automatic capitalization of all characters in the main menu links:
    prm-topbar .md-button {
         text-transform: none;

    Search Bar

    This section identifies the major components of the Search Bar.
    Search Bar Components
    1. prm-search-bar{}
    2. /* the text color in the search box */
      input::-webkit-input-placeholder { }
      input:-moz-placeholder { /* Firefox 18- */}
      input::-moz-placeholder {  /* Firefox 19+ */}
      input:-ms-input-placeholder {}
    3. md-autocomplete-wrap input {}
    4. prm-search-bar .simple-search-wrapper .search-actions .md-button {}
    5. prm-search-bar .search-switch-buttons .md-button {}

    Moving the Facets to the Left Side

    Out of the box, the new UI displays the facets on the right side of the results page. After the May 2017 release, you can use the Side bar (Tweak my results) position field in the Views Wizard (Primo Home > Ongoing Configuration Wizards > Views Wizard) to move the facets to either the left or the right side of the page.

    My Library Page

    Disabling the Institution Panel

    For consortia, the option to select an institution was previously provided in a drop-down list at the top of My Library Card and was replaced with the Institution panel on the left side of the page.


    Institution Panel in My Library Card

    If you prefer the old display, add the following CSS to your customization package:

    .institutions-list {display:none;} 

    prm-linked-user-selector md-input-container {display:block!important;} 

    Creating a Search Box With Deep Links to the New UI

    This example creates a search box that uses a deep link to search your institution's catalog.
    To create a search box:
    1. Create an HTML file and include the following lines, ensuring that you replace the host name, customizable parameters (such as view code), and the fixed parameters (such as bulk size):
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <!-- Script that converts the query string into valid parameter -->
      <script type="text/javascript">
      function searchPrimo() {
      document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
      <form id="simple" name="searchForm" method="get" target="_self" action="http://<host_name>/primo-explore/search" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
      <!-- Customizable Parameters -->
      <input type="hidden" name="institution" value="<institution_code>">
      <input type="hidden" name="vid" value="<view_code>">
      <input type="hidden" name="tab" value="<tab_code must be lowercase>">
      <input type="hidden" name="search_scope" value="<scope_name>">
      <input type="hidden" name="mode" value="basic">
      <!-- Fixed parameters -->
      <input type="hidden" name="displayMode" value="full">
      <input type="hidden" name="bulkSize" value="10">
      <input type="hidden" name="highlight" value="true">
      <input type="hidden" name="dum" value="true">
      <input type="hidden" name="query" id="primoQuery">
      <input type="hidden" name="displayField" value="all">
      <!-- Enable this if "Expand My Results" is enabled by default in Views Wizard -->
      <input type="hidden" name="pcAvailabilityMode" value="true">
      <input type="text" id="primoQueryTemp" value="" size="35">
      <!-- Search Button -->
      <input id="go" title="Search" onclick="searchPrimo()" type="button" value="Search" alt="Search" style="height: 22px; font-size: 12px; font-weight: bold; background: #DE6E17; color: #ffffff; border: 1px solid;">

      Example search query:,contains,herring&tab=primo_central&search_scope=PC&vid=MY_VIEW&lang=en_US&offset=0

      The value specified for the tab parameter must all be lowercase even if its definition in the Views Wizard contains any uppercase letters.
    2. To test the search box, open the HTML file in a browser and perform a search. If you saved the HTML file on a Web server, use the following URL to access the search box:
      The search box appears as follows:

    Creating a Twitter Feed

    This procedure creates a link on the home page, which opens your Twitter feed in a new tab.


    Link to Twitter Feed on Home Page
    To add a Twitter feed:
    1. Create an HTML link based on your Twitter feed. For details, see

    2. Edit the home_en_US.html file and embed the HTML link created in the previous step.

      For example:

      <div flex-xs flex="40" layout="column">
       <md-card class="default-card">
       <span class="md-headline">Twitter</span>

      <a class="twitter-timeline" href="">Tweets by ExLibrisGroup</a> <script async src="" charset="utf-8"></script>

    3. Compress, upload, and deploy your updated customization package. For more information, see Using the UI Customization Package Manager.

    Creating a Custom Help Page

    The new UI allows you to create and embed a custom help page, which contains information on how to utilize the interface to access services provided by your institution. To provide a custom help page, you will have to create the help file, upload the help file to the server, and add a link in the new UI to allow users to access the help page.

    Creating and Uploading the Help File

    The new UI allows you to provide help files for each language supported by your institution. The naming convention is help_<language>.html (such as help_en_US.html). All custom help files must be placed in the html directory of your view's customization package.
    To create and upload the help files:
    1. Download your view's customization package (see Modifying a View-Level Package).
    2. For each language supported, create an HTML help file (using the naming convention mentioned above).
    3. Save the files under the html directory of your view's customization package.
    4. Compress your view's package and upload it to the server (see Modifying a View-Level Package).

    Adding the Help Link to the UI

    The Main Menu tile in the Views Wizard allows you to define the Help link that appears at the top of the page in the new UI.
    Help Link in Main Menu Tile of the New UI
    To add the Help Link:
    1. In the Views Wizard (Primo Home > Ongoing Configuration Wizards > Views Wizard), edit your view.
    2. Continue to the Tiles Configuration page and edit the Home Page > Main Menu tile.
    3. In the Create New Label section, specify the following fields and then click Add:
      • Label – Enter primo_help.
        If you want to use a help file that is not stored on the Primo Front End server, specify a different Label, such as Help.
      • URL – Leave blank so that the system uses the file that you uploaded with your view's customization package. See Creating and Uploading the Help File.
        If you want to use a help file that is not stored on the Primo Front server, specify its URL.
      • Link should open in – Specify where the help page will open in the browser. Select either current window or new window/tab.
      Create New Label Section - Main Menu Tile
    4. In the Contents of Main Menu Tile section, modify the Label field to change the label that displays in the Main menu of the new UI. This change will update the description for the mainmenu.label.primo_help code in the View Labels code table.
    5. Save your changes to the view and deploy your view.
    6. If necessary, update the Description column for the following codes in the View Labels code table to modify the label and label description for the help link in the new UI.
      • mainmenu.label.primo_help – Defines the label for the help link in the new UI. You can also update this value by changing the Label field of the Main Menu tile in the Views Wizard.
      • nui.mainmenu.description.primo_help – Defines the description of the help link in the new UI.
    7. Deploy your changes to the code table.

    Disabling Short Permalinks in the New UI

    By default, the Send To action Permalink, which displays on both the Brief and Full Display pages, creates a shortened URL that includes the record ID and a key:

    <Primo Domain>/permalink/f/<key>/<record_ID>

    For example:

    When the URL is entered in a browser, Primo will convert the URL to its full URL and display the record's Full Display page. The following is an example of a long permalink:
    To disable short permalinks:

    This enhancement is enabled by default. To revert to the long format, add the following lines to the CSS file in your customization package:

    .__xs prm-permalink .layout-column>.long-permalink, prm-permalink .layout-column>.long-permalink {

        display: inherit;



    .__xs prm-permalink .layout-column>.short-permalink, prm-permalink .layout-column>.short-permalink {

        display: none;


    Customizing the RefWorks Link in the Primo User Area Menu

    When the RefWorks code is enabled in the Actions List mapping table, the RefWorks link is enabled by default in the Primo User Area Menu.


    Primo User Area Menu - RefWorks Link

    You can perform the following configurations to customize it:

    • Update the code in the User Tile Labels code table to modify the link's display label.

    • Hide the link in the Primo User Area menu by setting the following class selectors in your custom CSS file: 

      .my-refworks-ctm {

         display: none;



      .my-refworks-separator-ctm {

         display: none;



    • Was this article helpful?