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

    The UI Customization Package Manager

    If you are working with Primo VE and not Primo, the relevant documentation is located in the Creating a Customization Package section of the Knowledge Center.
    The UI Customization Package Manager (Primo Home > Primo Utilities > UI Customization Package Manager) allows you to create and manage the customization packages that include the CSS, HTML, JavaScript, and image files, which allow you to change the look of the Front End user interface. If no packages are loaded, the system will use only the out-of-the-box configurations. For additional information, see New UI Customization.
    Database files (.db) are not permitted in your customization package. If the following error occurs while uploading your ZIP file, remove all .db files:
    Validation error: File type db is not allowed in the zip file
    You may have to change an option in Windows to display hidden files if you cannot see any .db files in your customization package folder.
    UI_Cust_Package_Mngr.png
    UI Customization Package Manager Page
    This utility allows you to load the following types of packages:
    • Central – This package allows a consortium to define a single customization package that can be used directly or as a template by each member institution. Configurations in this package override settings defined in the out-of-the-box configurations. When used as a template, member institutions can create a view-level customization package to override settings in the Central package.
      To create and modify the Central package itself, users must have Super Admin permissions.
    • View-level – This type of package allows you override the out-of-the-box settings and the Central package (if defined for your consortium).

    In addition, you can use the UI Customization Package Manager to perform the following:

    Creating a View-Level Package

    Loading a view-level package allows you to override configurations defined in the Central package and the out-of-the-box configurations. If no package is loaded, the system will use the out-of-the-box configurations.
    To create a view-level package:
    1. From the Owner drop-down list, select your institution.
    2. From the View drop-down list, select your view.
    3. Under the Download a Package section, click Download to select one of the following templates:
      • Template package – This template defines a package's folder structure and includes the files (such as custom1.css and home_en_US.html) needed to create a package.
      • Central package – For member institutions in a consortium, download the Central package if you want to override settings from it and the out-of-the-box configuration.
    4. Create the new package from the template:
      1. Uncompress the template.
      2. Change the name of the VIEW_CODE folder to your view's code.
        Package_Root.png
        Change Folder's Name
      3. Use the browser's inspect functionality to determine which CSS elements to modify in the new Front End UI.
      4. Update the relevant files that are stored under the directories shown in the following figure. Remember to add any new or updated images to the img folder.
        Package_Folders.png
        Package Folder Structure
        In order for the system to recognize your customizations, you must retain the package structure (including folder and file names). In addition, it is necessary to retain the file names for images and other files that you modify and include in your customization package.
      5. Compress the view's package. In this example, you would compress the My_View folder. 

        For Windows users, it is recommended that you use 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"

    5. Upload the new package (for example, My_View.zip):
      1. Under the Upload Package section, click Choose File.
      2. Specify the name of the compressed package.
      3. Click Upload.
    6. Deploy your view.

    Modifying a View-Level Package

    After you have loaded a package, you can download it to make further changes.
    To modify a view-level package:
    1. From the Owner drop-down list, select your institution.
    2. From the View drop-down list, select your view.
    3. Under the Download a Package section, click Download to download view-level package (which is identified by the view's code).
      Download_ViewLevel_Package.png
      Download View-Level Package
    4. Decompress, modify, and then compress the modified package.
      To avoid upload errors, it is recommended that you use a compression tool such as 7zip or Winrar instead of Windows Send to > Compress folder.
    5. Upload the updated package:
      1. Under the Upload Package section, click Choose File.

      2. Specify the name of the compressed package.

      3. Click Upload.

    6. Deploy your view.

    Creating the Central Package

    The Central package defines the base formatting for all member institutions in a consortium.
    To create the Central package:
    1. From the Owner drop-down list, select All Institutions.
    2. From the View drop-down list, select CENTRAL_PACKAGE.
    3. Under the Download a Package section, click Download to download the Template package.
    4. Create the new package from the template:
      1. Uncompress the template.
      2. Change the name of the VIEW_CODE folder to CENTRAL_PACKAGE.
        Package_Root.png
        Template's Root Folder
      3. Use the browser's inspect functionality to determine which CSS elements to modify in the new Front End UI.
      4. Update the relevant files that are stored under the directories shown in the following figure. Remember to add any new or updated images to the img folder.
        CentralPackageFoldersStructure.png
        Central Package Folder Structure
      5. Compress the view's package. In this example, you would compress the CENTRAL_PACKAGE folder.

        To avoid upload errors, it is recommended that you use a compression tool such as 7zip or Winrar instead of Windows Send to > Compress folder.

    5. Upload the new package:
      1. Under the Upload Package section, click Choose File.
      2. Specify the name of the compressed package.
      3. Click Upload.
    6. Deploy your view.

    Modifying the Central Package

    After you have loaded the Central package, you can download it to make further changes.
    To modify the Central package:
    1. From the Owner drop-down list, select All Institutions.
    2. From the View drop-down list, select CENTRAL_PACKAGE.
    3. Under the Download a Package section, click Download to download the Central package.
      Download_Central_Package.png
      Download Central Package
    4. Decompress, modify, and then compress the modified package.
      To avoid upload errors, it is recommended that you use a compression tool such as 7zip or Winrar instead of Windows Send to > Compress folder.
    5. Upload the updated package:
      1. Under the Upload Package section, click Choose File.

      2. Specify the name of the compressed package.

      3. Click Upload.

    6. Deploy your view.

    Inheriting from the Central Package

    For consortia, member institutions have the option to enable or disable the Central package after it has been loaded onto the FE server.
    To inherit from the Central package:
    1. From the Owner drop-down list, select your institution.
    2. From the View drop-down list, select your view.
    3. Under the Download a Package section, verify that a package has been loaded for the Central package field.
    4. Under the Upload Package section, select the Inherit from Central Package check box and click Save.
    5. Deploy your view.

    Disabling Packages While Testing

    While testing in the Front End UI, you can temporarily disable the Central and view-level packages so that you can compare your changes to the out-of-the-box CSS.
    To temporarily disable your CSS packages:
    1. Open the new Front End UI in a browser.
    2. Add the &package=OTB parameter to the end of the URL and press ENTER to refresh the page. For example:
      http://my-primoqa02:1701/primo-explore/search?vid=MY_VIEW&lang=en_US&package=OTB
    3. You can toggle between the out-of-the-box formatting and your customized formatting by adding and removing this parameter.

    Adding a Clickable Logo

    The UI Customization Package Manager allows you to upload a clickable logo, which redirects users to a specified URL when it is clicked in the new Primo UI. When using this method, no other configuration is needed to make your logo clickable.
    UI_Cust_Package_Mngr_ClickableLogo.png
    Updated UI Customization Package Manager
    To upload a clickable logo:
    1. Open the UI Customization Package Manager (Primo Home > Utilities > UI Customization Package Manager).
    2. In the Upload Logo section, select Browse to locate and select the image that you want to use for your institution's logo.
      The system places the following restrictions on the logo file:
      • The file format of the image must be .png.

      • The height of the image cannot exceed 120 pixels.

      • The width of the image cannot exceed 300 pixels.

      • The size of the image cannot exceed 30 KB.

    3. Click Upload to upload your selection the to Front End server. If you want to remove the logo, click Delete.
    4. If you want to redirect users to a page other than the Primo Home page, specify a URL in the Logo Clickable URL field.
    5. Click Save to save your changes.
    6. Deploy the changes to the Front End.  

    Customizing the Email Template

    Primo allows you to customize the format of emails sent to users after selecting the Send To Email action in the new UI. You can customize the format with or without Primo Studio. With either method, you must upload the customized email templates with the Customization Package Manager in the Primo Back Office. In addition, you can create separate email templates for each supported language in the UI.

    • The email template for the new UI supports a maximum of 50 records. If a user sends more than 50 records, the system will revert to the classic email template, which was used in previous releases.

    • For security reasons, all links will be removed from your email template.

    The following figure shows the sample output of the out-of-the-box Email template for the new UI.

    Primo_SendEmailExample.png

    Example Email for Send To Email Actions in New UI

    The Email template is in HTML format and includes the following sections:

    • Logo – Displays the logo, which is taken from your view's customization package.

    • Institution note – Displays the text configured with the following code in the Send Email and SMS code table: default.nui.email.institutionNote. By default, this field has no value and will not display if left empty.

    • List of records – For each record, the email displays the record's brief display and availability statement.

    • Disclaimer – Displays the text configured with the following code in the Send Email and SMS code table: default.nui.email.disclaimer

    Configuration Options

    The email_<4-digit_language_code>.html template files (such as email_en_US.html) allow you to configure the layout and format of the emails (per supported UI languages) that are sent when users perform the Send To Email action in the new UI. For more details and examples of how to customize the email templates, see the following page on GitHub: 

    • If you decide to customize the out-of-the-box email template and your view supports additional languages, you must create and upload a separate template file for each language (including the default email_en_US.html file).

    • The alignment of the email's text is based on the settings of the email client.

    After you have created or modified any email template files, open the UI Customization Package Manager (Primo Home > Primo Utilities > UI Customization Package Manager), and then use one of the following methods to upload the email template files to the UI:

    • Store the custom email template files under the html directory in your view's customization package and upload the entire customization package.

    • Use the new Upload Email/Print Template section to upload only the email template files. If you have not uploaded a customization package for your view, this option will create one for you and store the custom email template files under the html directory.

      Primo_UI_CPM_EmailSection.png

      Customization Package Manager - New Upload Email Section

    If you want to delete an email template file, remove the email template file under the html directory in the view's customization package and upload the modified package to the UI. If you want to revert to the out-the-box email template, remove all email templates under the html directory in the view's customization package and upload the modified package to the UI.

    Accessing Primo Studio

    Primo Studio is an integrated environment that allows you to customize and test various aspects of your Primo views. For more information, see Using Primo Studio.

    GoTo_PrimoStudioSection.png

    Go to Primo Studio Section
    To access Primo Studio:
    1. In the Go to Primo Studio section, select Primo Studio.

      PrimoStudionConfigurationDialogBox.png

      Primo Studio Login Page

    2. Enter the following information:

      • Primo URL – Specify the base URL of your Primo UI.

      • Primo View – Specify your view's code.

      • Primo VE – For Primo VE environments, select this check box.

    3. Select Start your studio with the above details.

    • Was this article helpful?