Left Menu Right Menu
February 16, 2017

Implementing custom actions

Created by: Nick Budak, Lewis & Clark College

Description: This customization enables a library to add custom items to the actions menu in the new Primo UI. There are two built-in actions that you can enable - an action to report a problem record and one to open the PNX record - alongside the structure you need to add your own custom actions. 

System components: Package Manager/PBO, Javascript

Skill set requirements: PBO, Javascript

Implementation steps:
  1. Download your local institution’s UI package from PBO
  2. Edit the custom.js file in the package and add all of the code from this file to enable the plugin
  3. To choose your actions, insert a call to insertActions(), as in this example
    This function must be added after the code you copy and pasted in step 2
  4. Save your changes, created a zip file, and load it to the PBO using the package manager
  5. Deploy your new package to PBO

    Note: Developers can also install using npm - see this package for instructions

Additional notes

  • Be careful with the formatting of your JSON code - be sure to check for missing commas or quotes, as these will break the customization
  • If you add more than two or three actions, the customization may not work as expected
Related customizations:
Make changes in your local package

Back to Blog
Comments (0)
Reply To Article