June 5, 2017
Back to Blog
Add hide/show Summit libraries button
Created by: Mike Flakus, Portland State University
Description: In the detailed record view all partner library holdings are shown, which makes the lower parts of the view more difficult to read. This customizations hides this section of the view and creates a button to toggle between hiding and showing the section.
System components: Package Manager/PBO, JS, CSS
Skill set requirements: PBO, JS, CSS
- Ensure you have turned on inheritance from the Central Package, see documentation: Turn on inheritance from the Central Package
- Download your local package from PBO and unzip as described in our documentation: Make changes in your local package
- Open the file custom.js with your text-editor (e.g., Notepad++) and add the following code at the end of the file after the final })();
- You can customize the initial state (hidden/shown) and the text of the buttons by using the following code instead:
- For ‘default_state’ set the parameter to ‘visible’ to show the libraries initially or ‘hidden’ to hide the libraries initially.
- For ‘show_libraries_button_label’ and ‘hide_libraries_button_label’ set to any text to show on the button.
- The button has the CSS class hide_show_other_institutions_button you can reference to style the button as needed.
- Zip and upload your local package
Note: See complete code and further details at https://github.com/pdxlibrary/primo5-hide-show-other-institutions-central-package/blob/master/README.md