NEW SEARCH button in Primo
Tags: basic
Last Updated: Sep 30, 2011 01:04
- Description
Add a "NEW SEARCH" button to the Primo front end (basic and advanced search pages) so that users can click this to take them back to the initial Primo search screen and clear any checkboxes/searches they had on the go
- Author: Randy Oldham
- Additional author(s): Jennifer Robertson
- Institution: Tri-University Consortium
- Year: 2011
- License: BSD style
- Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
- Link to terms: [Detailed license terms]
- Skill required for using this code:
Basic
State
Stable
Programming language
JSP
Software requirements
None
Screen captures

Author(s) homepage
Download
http://www.exlibrisgroup.org/download/attachments/36667892/Primo+V3+New+Search+Button.doc
Working example
Installation instructions
- Log in to the Primo back office
- Under the "CONFIGURATION & MANAGEMENT WIZARDS" heading, Click "ADVANCED CONFIGURATION"
- Click on "ALL CODE TABLES"
- In the "SUBSYSTEM" drop down, select "FRONT END"
- Scroll down to the "SEARCH TILE" entry and click the EDIT button to the far right
- Scroll to the bottom of the list. In order to have the NEW SEARCH button show up on your BASIC SEARCH page, we need to add a new code table row to this table:
- in the CODE box, enter: VID.new_search_url, replace VID with the actual VID of the Primo VIEW you want your new search button to show up on
- in the DESCRIPTION box, enter the URL for your Primo View basic search page eg: http://URL/primo_library/libweb/action/search.do?vid=SOMETHING&reset_config=true
- in the LANGUAGE box, enter en_US for english
- in the DISPLAY ORDER box, leave the 0
- click the blue CREATE button
- Scroll to the bottom of the list. In order to have the NEW SEARCH button show up on your ADVANCED SEARCH page, we need to add another new code table row to this table:
- in the CODE box, enter VID.new_search_url_advanced, replace VID with the actual VID of the Primo VIEW you want your new search button to show up on
- in the DESCRIPTION box, enter the URL for your Primo View advanced search page http://URL/primo_library/libweb/action/search.do?vid=SOMETHING&reset_config=true&mode=Advanced
- in the LANGUAGE box, enter en_US for english
- in the DISPLAY ORDER box, leave the 0
- click the blue CREATE button
- Click SAVE & CONTINUE at the bottom of this screen
- Click the DEPLOY button at the top of this page
- We've now configured Primo so that it knows WHAT to do when it encounters the codes for "NEW SEARCH", but we haven't actually embedded the NEW SEARCH code into any of our views. That's next
- Open the lib.war directory on your primo server (for primo 3.1.1 the path is: /exlibris/primo/p3_1/ng/primo/home/system/thirdparty/openserver/server/search/deploy/primo_library-app.ear/primo_library-libweb.war/)
- Navigate to the "TILES" folder
- Make a copy of the searchTileBasic.jsp file
- Edit the original searchTileBasic.jsp file
- Replace the following code:
with
16. Save this file and send it back to the Primo server, overwriting the existing file
17. Make a copy of the advancedSearchTile.jsp file
18. Edit the original advancedSearchTile.jsp file and add the following code:
just above the following line (near the end of the file):
19. Save this file and send it back to the Primo server, overwriting the existing file.
20. Add some custom CSS styling to position everything so it looks proper (we call a custom CSS file in :

